Quantcast
Channel: Server Mods from Bukkit.org
Viewing all articles
Browse latest Browse all 2356

Pl3xNPC

$
0
0

Pl3xNPC

A simple plugin that brings life to your server with talking NPCs!


NOTICE:

Please be sure you DO NOT mix CB versions.

This plugin is highly dependable on the CB version. Mixing WILL cause errors!

Please download the Pl3xNPC version that is supported by the CB version you are running.

This can be verified by looking to the right of the file page where it says "Game Version". It will list something like CB 1.4.7-R1.0

No support will be given to alternate server software (a.k.a. Spigot or CB++, etc).




Description

This is a complete rewrite from the ground up of my popular plugin DwDNPC*. Pl3xNPC is planned to expand out to include pathing, animations, and a better chating system for the NPCs (plus whatever else I can think up or is suggested to me).

Currently this is in Beta stages, as it is a complete rewrite and I'm still working out some bugs. So please, if you find anything wrong post a ticket so I can become aware of it! Its hard to find all the bugs by myself.

There is no mob skin support right now, as that was causing a lot of unwanted critical bugs (100% cpu usage, being most potent). Until I can find a better way to implement mob skins this will not be a feature of this plugin. Premium skins do still work for the regular player type NPCs, though. There are a few names out there with similar skins, like a player named Villager for example. ;)

All interactions with this plugin are via command (for now) and the only clickable interaction is to select the NPC which you want to edit. I thought this was a lot better than having to type the ID/name of the npc with each and every command. Soon I will add back the ability to click armor/items onto the NPC again, as that was a very cool feature. The reason click adding items was removed is I'm reworking the base of how it works. Pl3xNPC doesnt spawn items from thin air (unless you have the perm node) to give to the NPCs. You must have the item in your inventory to give, and it will give it away to the selected NPC. Right now, there is no way of getting items back once given to an NPC. I'm still deciding how I want to handle getting items back from them. I'm thinking either dropping the item on the ground when you give something in replace, or maybe place it directly back into your inventory. There are pros and cons for both ways, and I'm still weighing out the options. Feedback/thoughts in the comments would be greatly appreciated.

Right clicking the selected NPC with an item will now give that item to the NPC. To take the item away, simply give it a different item, or give it air/nothing. You can only give an NPC air/nothing using commands, as right clicking an NPC with air/nothing will simply select that NPC.

The NPCs will also give the items back to you if you replace the item with something else (or give it air/nothing). If your inventory is full and there is no room left for more items, the NPC will simply drop the item to the ground instead of giving it to you.

There is currently an exploitable bug where giving an NPC damaged/used items, the NPC will give you back full health items. I am working on a fix for this ASAP. Other bugs, or i should rather say "missing features", include special items losing their special abilities. Like named heads, items with custom lore, enchanted armor/weapons, colored leather armor, etc etc, they will all become plain and normal after giving them to an NPC. Don't worry, though, as these are all on my list of things to do and will make it into the final release of v1.0.0 (after quite a few betas, of course).

Anyways, enough jibber jabber from me. You all came here looking for a cool plugin to use, so lets get to it! All the juicy info is below! ^_^




Bukkit ReleaseBukkit Release1.4.7-R1.0
Required DependenciesDependenciesNone
Optional DependenciesOptional DependenciesMultiWorld, Multiverse-Core, VanishNoPacket
Source Code (BitBucket)Source codebitbucket

Pl3xNPC MCStats




Features

  • Creation of any Player username!
    • Premium names show Premium skins
    • Multiple NPCs can have the same name
      • Each NPC is identified by a unique ID number
        • Selecting an NPC by right-clicking with empty hand will display the name, ID number, and owner.
  • NPCs now have owners
    • You can give your users the ability to create their own NPCs now without the fear of messing with others' or the main config.
    • NPCs can only be manipulated/deleted by their owner (including the armor/items).
    • Server admins have the ability to bypass owners (with proper perm node).
  • Armor can be given to NPCs!
    • Select an NPC and use the command to give any armor!
      • Armor slots are protected to armor only
        • Right-clicking with armor will place the armor into the proper armor slot automatically
      • Give air (none, or empty also work) to remove that armor slot for the NPC
      • Must have the item to give (removes from your inventory) unless you have the spawn perm node
      • All items given can now be taken back!
  • Weapons can be given to NPCs!
    • Select an NPC and use the command or right-click to give any item!
      • In hand item can be anything, not just weapons
      • Give air (none, or empty also work) to remove the in-hand item from the NPC
      • Must have the item to give (removes from your inventory) unless you have the spawn perm node
      • All items given can now be taken back!
  • NPCs can talk!
    • One-liner messages
    • Triggered when walking into a customizable message adius
    • Admin can set the chat format (to match ANY chat plugin's style)
    • Includes variables: {world} {npc} {name} {dispname}
    • Chat styles and color codes supported!
  • Very low resource demand!
    • No extra bells and whistles to slow things down or put a strain on the system
    • The global update refresh rate (update-interval) is customizable from 1 (20FPS)) to 20 (1FPS) ticks
  • Easy setup
    • Just drop in the Pl3xNPC.jar file to plugins folder and go!
    • No configuration to mess with
      • Everything is configurable via easy in-game commands
    • Debug-mode works better and wont spam your console anymore
  • Metrics support
    • Can be opted out from sending global stats, but keep in mind we use this data to know which parts of the plugin are mostly used


TODO List

This list is constantly changing depending on user demand.

  • Add ability for NPCs to use enchanted armor/weapons (not just normal ones).
  • Add ability for NPCs to wear COLORED leather armor.
  • Add back Spoutcraft support for custom skins.
  • Add ability to right-click the NPC to give it the item in your hand.
  • Add the ability to get items back from the NPC after giving it to them.
  • Add the ability to have a limit on how many NPCs a user can create


Permissions

All perm nodes:

nodedescriptiondefault
pl3xnpc.createAllows you to create NPCsOP
pl3xnpc.deleteAllows you to delete NPCsOP
pl3xnpc.set.itemAllows you to set items on the NPC (armor, item in hand)OP
pl3xnpc.set.item.canspawnAllows you to set items on the NPC without having them in your inventoryOP
pl3xnpc.set.lookatAllows you to set the look-at aware radius of an NPCOP
pl3xnpc.set.message.radiusAllows you to set the message aware radius of an NPCOP
pl3xnpc.set.nessage.sayAllows you to set the message an NPC saysOP
pl3xnpc.set.nameAllows you to set an NPCs nameOP
pl3xnpc.set.ownerAllows you to set the owner of an NPC (removes ownership from you)OP
pl3xnpc.adminAllows you to use the admin commandsOP

Grouped perm nodes:

nodegives nodesdefault
pl3xnpc.adminpl3xnpc.create
pl3xnpc.delete
pl3xnpc.set.*
OP
pl3xnpc.set.message.*pl3xnpc.set.message.radius
pl3xnpc.set.message.say
no one
pl3xnpc.set.*pl3xnpc.set.item
pl3xnpc.set.lookat
pl3xnpc.set.message.*
pl3xnpc.set.name
pl3xnpc.set.owner
no one
pl3xnpc.*pl3xnpc.create
pl3xnpc.delete
pl3xnpc.set.*
pl3xnpc.set.item.canspawn
pl3xnpc.admin
no one




Commands

All commands are in a single command /npc. Remember to select the NPC first that you are trying to edit by right clicking it with nothing in your hand!

commandaction
/npc create (name)Creates a new NPC where you are standing. Name is optional, and can be changed later.
/npc deleteDeletes the selected NPC
/npc set item [type] [value]Gives the selected NPC an item.
Valid types are helmet, chestplate, leggings, boots, in_hand.
Valid items are any named item or item id number.
/npc set lookat radius (value)Set the look-at aware radius of the selected NPC only.
/npc set name [name]Renames the selected NPC.
/npc set owner [newowner]Transfers ownership FROM you to another player. You will no longer have rights to this NPC!
/npc set message radius [value]Sets the message aware radius for the selected NPC only.
/npc set message say [message]Sets the message for the selected NPC.
/npc admin delete [id/name/all]Can delete any NPC specified, or all, or the selected one.
/npc admin lookat radius [value]Sets the default look-at aware radius for all NPCs.
/npc admin message radius [value]Sets the default message aware radius for all NPCs.
/npc admin message format [value]Sets the message format for all NPCs. The default is <{npc}> {message}
/npc admin set item [type] [value]Admin override of owner. Gives the selected NPC an item.
Valid types are helmet, chestplate, leggings, boots, hand.
Valid items are any named item or item id number.
/npc admin set lookat radius (value)Admin override of owner. Set the look-at aware radius of the selected NPC only.
/npc admin set name [name]Admin override of owner. Renames the selected NPC.
/npc admin set owner [newowner]Admin override of owner. Transfers ownership FROM you to another player. You will no longer have rights to this NPC!
/npc admin set message radius [value]Admin override of owner. Sets the message aware radius for the selected NPC only.
/npc admin set message say [message]Admin override of owner. Sets the message for the selected NPC.
/npc admin update-interval [value]Sets the update-interval. This is in ticks. Valid values are between 1 and 20 only.
/npc admin reloadReloads the configuration values from the hard disk and force respawns all NPCs.




Configuration

There is only 1 configuration file for this entire plugin. I strongly recommend not editing this by hand! Everything is easily configurable with the in-game commands.

This is only a SAMPLE configuration file!

config.yml

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
debug-mode:falsecolor-logs:trueupdate-interval:3look-at-radius:10.0message-radius:5.0message-format:<{npc}>{message}npcs:'0':name:Testing_1_2_3owner:BillyGalbreathworld:Pl3xx:-447.0y:63.0z:-36.0massage:radius:5.0say:Hello,{name}!'2':name:Villagerowner:BillyGalbreathworld:Pl3xlook-at-radius:40.0x:-447.0y:63.0z:-35.0message:say:Hi,{dispname}!Youarecurrentlyin{world}.Mynameis{npc}.'3':name:TownGuardowner:BillyGalbreathworld:Pl3xx:265.63553322889777y:64.0z:-1755.561612630681items:in_hand:material:BOWhelmet:material:IRON_HELMETchestplate:material:IRON_CHESTPLATEleggings:material:IRON_LEGGINGSboots:material:IRON_BOOTSmessage:radius:5.0say:Iwillprotect&eGateWay!



Dependencies

There are no required dependencies for this plugin, but there are a few optional ones.

VanishNoPacket is an optional dependency for if your admins want to vanish from the npcs. Essentials /vanish is currently not supported, yet. While vanished the NPCs will not look at you or trigger a message to you.

Multiverse-Core or MultiWorld is an optional dependency to force Pl3xNPC to load after these load. This is here to prevent an NPE error from trying to load an NPC into a world that has not been loaded into memory on server startup. If you use a different plugin to control multi-world support you can easily add that plugin to the optional dependencies yourself to prevent any NPE errors. Just open Pl3xNPC.jar up into any archive program (like WinRar) and edit the "softdepends" section in the plugin.yml file. The name you put in here must match the name in the plugin.yml file of the plugin you are making a dependency! If you have any troubles or want to share the dependency, let me know and I can include the optional dependency into the main plugin for everyone else to use, too.



F.A.Q.

  • What's the difference between Pl3xNPC and Citizens?
    • Citizens is a full blown NPC plugin with advanced features like paths/waypoints and even custom RPG type characters, among a lot of other things. Pl3xNPC doesnt have all these extra bells and whistles and I, and most probably you, dont need and will never use. Thus making a slimmer plugin that runs smoother and faster and uses way less resources. This is as basic as you can get while still having minimal interaction (look at players & chat messages) with the NPCs. However, in the future I plan on looking into pathing/waypoints to make the NPCs able to be mobile and move around. I dont think I will ever make a questing system to this plugin, though. IF (thats a BIG if) I do make a questing system, it will be an add-on plugin.
  • Can I use custom skins from my computer/the internet/etc?
    • Unfortunately, no. Not yet. I plan on adding back Spoutcraft support, but there is no ETA for this. Spoutcraft support would allow loading of NPC skins via the internet (must be http or open ftp, not directly from your computer or the mc server), but these skins would only be viewable for your users that use the Spoutcraft client. Any other client will not see the Spoutcraft skins, and the regular Steve (or premium, if premium name is used) skin will show instead.
  • How do I do <fill in the blank here>?
    • Please have a look at the Commands and Permissions sections up above to get some basic instructions. There are also in-game help guides for each command/subcommand that you type to help you (just type /npc to get started with a list of the available subcommands).
  • I found a bug!
    • Sweet deal! I cant find every bug that finds it way into the plugin, and this is where you guys can help. Just click on the "ticket" link and the very top of this page (in the Bukkit links section) and report it so I can become aware of it and start working on a fix for it. If you just put a comment on this page I will lose track of it and/or go days without ever seeing it. So use the ticket system if you want a timely fix/response to the situation.
  • I want <fill in the blank> feature to be added!
    • This is another thing that can actually be done with the ticket system (linked at very top of page under the BukkitDev logo). The ticket system helps me keep track of things without them getting buried by comments in the comments section. I also get notified by email and on my phone when a ticket is created, so I will be able to see it and respond quicker. Keep this in mind though, Pl3xNPC is not planned to replicate the Citizens plugin, so asking for Citizens features (like questing system) will most likely get denied. If you want Citizens features that Pl3xNPC lacks, then use Citizens.


Found a bug?

Awesome! Most likely I havent come across that one, so you finding it just helped me out! All I ask in return is you submit a ticket to my bug tracker so I can become aware of it and progress towards getting it fixed can begin. If you just tell me in a PM or a comment I'll forget about it or may not even notice it right away (I dont check this site daily).

A link to my bug tracker has been included on this page for convenience. Its at the very top of the page, directly under the Bukkit logo in the blue navigation bar. Its the tab that say "Tickets". Be sure you include as much detailed information as you can so I can recreate the situation. This includes a list of plugins you have installed (and versions), the craftbukkit version (or whatever other server software you use: spigot, cb++, etc), a copy of your config.yml, and detailed explaination of things.

Thanks again for taking the time to report the bug!



Screenshots

Coming soon.


Viewing all articles
Browse latest Browse all 2356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>