ClassSign
Features
- Create signs that, when punched, will fill your inventory/armor with pre-defined items based on classes.
- Define your own classes!
- As an op, disable/enable signs on the fly.
- Choose to clear the shown inventory, or whole inventory, before giving items, or not at all.
- Choose to overwrite the currently worn armor, or not.
- Give either items, armor, or both!
- Make it so that a sign can only be used once! These settings persist through reload, so players will not be able to use signs they've previously used after a server reload.
- Clear a user's sign usage history!
Summary
This plugin allows you to create signs which will allow you to fill your inventory with pre-configured items based on a class system. It will also allow you to replace Armor with pre-defined items. Anybody with the correct permissions (or if permissions isn't found - an op) can disable/enable signs on the fly, by right clicking the sign. To use the sign, punch it (left click).
You can also create a one-use sign, which can only be used by each player once.
Note: This plugin will also create a file called signs.dat in it's configuration folder. Do not edit this file, or delete it
If you have the correct permissions (or if you're an op), you can place class signs like so:
[Class] <class_name> <blank> <blank>
To create a One-Use sign, use this template:
[Class] <class_name> [One-Use] <blank>
If done correctly, the 4th line should change to a green [Active] tag.
Read the Configuration section below to find out how to define classes.
Screenshots
See images tab.
To-Do
- (possibly) change permission group when a sign is used?
- Add economy support.
- Add Permissions node to protect certain players from one use sign mode. If you have any suggestions, post them below and I may choose to implement it!
Settings
The configuration file properties.yml will be created with default values as shown below:
classes: Chef: items: 39:10,40:10,281:10 Knight: items: 267,320:5 armor: 306,307,308,309 Archer: items: 261,262:50,297:4 armor: 298,299,300,301 Armored: armor: 302,303,304,305 Builder: items: 44:64,44@2:64,44@3:64,44@4:64,44@5:64 overwriteArmor: true emptyInventory: false emptyWholeInventory: false
- classes - this is where all the class definition takes place. Following the default guidelines, you can specify your own class. Please note, when indenting, use FOUR SPACES (not tabs).
- Chef, Knight, Archer, Armored - these are sample classes, each with different item/armor definitions. For example, the Chef gets 10 brown mushrooms, 10 red mushrooms, and 10 wooden bowls. The Chef gets no armor (and if overwriteArmor is on, their armor is removed). The Knight gets an Iron sword and 5 cooked porkchops. The Knight also gets a full set of Iron armor. The Armored class gets a full set of Chainmail Armor. The Armored class gets no items (but if emptyInventory is on, the inventory is still cleared.) To define items/armor, use the Block IDs that can be found using www.minecraftwiki.net and searching the block name. To define an amount, use a colon, then the amount. Do NOT use amounts on Armor definitions. Armor definitions MUST be in this order: Helmet, Chestplate, Leggings, Boots. If you want to omit an Armor part, define a 0 (zero) (e.g. 0,303,304,305 will give full chainmail, except a helmet.) overwriteArmor - when set to true, the player's previous armor is removed, and then the new armor (if applicable) is given. Otherwise, the given armor will fill any "gaps." (e.g. if a player is already wearing a leather helmet, and selects the Armored class, they will keep their leather helmet, and be given Chainmail chestplate, leggings and boots.) The Builder class gets 64 of every possible slab. This shows how to use Data Values in items.
- emptyInventory - when set to true, the bottom 9 inventory slots (the ones always on show) will be cleared before items are given. Otherwise, items are given on top of this.
- checkVersion - when set to true, the plugin will perform a simple version check at every load/reload, and will report to the console when an update is available. When set to false, this check is disabled.
- emptyWholeInventory - when set to true, the player's whole inventory is cleared. This option OVERRIDES emptyInventory. If emptyInventory is set to false, but this is set to true, the whole inventory will still empty.
Permissions
These permission nodes will work with either Permissions 2.x, or Bukkit SuperPerms. When using SuperPerms, any admin permissions - and enable/disable permissions - will default to an op check, any other nodes will default to true for everyone.
- classign.user.place - allows the player/group to place Class Signs.
- classign.user.use - allows the player/group to use a sign.
- classign.admin.toggle - allows the player/group to toggle a sign between active and inactive by right-clicking.
- classign.admin.clearuser - allows the player/group to use the command that clears a user's sign usage history.
- classign.admin.add - allows the player/group to add a class using commands.
- classign.admin.remove - allows the player/group to remove a class using commands.
- classign.admin.items - allows the player/group to change the item output of a class using commands.
- classign.admin.armor - allows the player/group to change the armor output of a class using commands.
Commands
For all commands listed below, you can either use /cs, /classsign, or /classign.
- /cs clearuser <username>
This command clears the specified user's sign usage history, allowing him/her to re-use signs they've used before, even if one use sign mode is enabled.
Requires Permission: classign.admin.clearuser
- /cs class add <class name>
This command adds the specified class to the config file. It will not let you add a duplicate class.
Requires Permission: classign.admin.add
- /cs class remove <class name>
This command removes the specified class from the config file. This is irreversible. It will not let you remove a non-existant class.
Requires Permission: classign.admin.remove
- /cs class items/armor <class name> <values>
This command lets you change the item or armor output of a class. Please note, you *must* follow the same rules as in the configuration file. For items, you must define them with no spaces inbetween, just commas. For armor, you must not define an amount, and you must have 4 values, in top to bottom order.
Requires Permission: classign.admin.items OR classsign.admin.armor - depending on which command