Kit Config
Kit Config
Sample kit configuration:
SampleKit: items: - Iron_Sword:1 Sharpness:1 - Bow:1 Punch:1 - Arrow:64 - Iron_Helmet:1 - Iron_Chestplate:1 Protection:1 - Chainmail_Leggings:1 - Chainmail_Boots:1 effects: - Strength:1 infiniteEffects: true timeout: duration: 30 global: false singleUse: false singleUsePerLife: false clear: all: true inventory: true effects: true permissions: true inheritance: parent: '' upgrade: true inheritParentPerms: true requireParentPerms: false economy: cost: 0.0 cash: 0.0 restrictions: armor: false drops: false deathDrops: false pickups: false otherKits: false showInList: true
Details
Kits are defined in this general format:
[kit-name]: [attribute]: [value] [attribute]: [value] [attribute]: [sub-attribute]: [value] [sub-attribute]: [value] etc.
IMPORTANT: when writing your kit configuration, always remember that indentation must be done with a fixed number of spaces. Bukkit's yaml parser does not currently allow the use of TAB indentation.
Available Attributes
IMPORTANT: every attribute has a default value. If you wish to retain the default value, you may simply remove the attribute from the kit's configuration. The only reason to define a default attribute is to override a parent kit's attribute.
| attribute | sub | description | default |
|---|---|---|---|
| items | This is where you should list all items that will be included in the kit. For help on defining items, you should view the Items page. | none | |
| effects | This is where you should list all potion effects that will be included in the kit. For help on defining effects, you should vew the Effects page. | none | |
| permissions | This is a list of all the permission nodes that should be granted as long as the player holds this kit. These permissions can only function if Vault and a Vault-compatible permissions manager are installed as well. | none | |
| infiniteEffects | true or false whether the kit should infinitely re-apply all of its potion effects while the player still has the kit. The automatic renewing will continue until the player takes another kit that clears effects, or some other event causes the player's kits to be cleared. | false | |
| timeout | duration | This is the span of time, in seconds, before the player will be allowed to take the kit again. The permission node kitmaster.notimeout will override this. | 0 |
| global | true or false whether the kit should apply the same timeout to every player. If this is true, then no player will be allowed to take the kit until the timeout duration has passed. The permission node kitmaster.notimeout will override this. | false | |
| singleUse | true or false whether the kit should only allow itself to be taken once, under any circumstances. If true, once the kit is taken, the only way for the kit to be taken again is for the timestamps file to be deleted or modified. | false | |
| singleUsePerLife | true or false whether the kit should only allow itself to be taken once per life. This functions essentially the same as singleUse, but will reset itself when the player dies. | false | |
| clear | all | true or false whether the kit should clear everything kit-related from the player. This attribute acts the same as setting all the other clear sub-attributes to true. | false |
| inventory | true or false whether the kit should clear the player's inventory before applying itself. | false | |
| effects | true or false whether the kit should clear the player's potion effects before applying itself. This is the only attribute that will remove an infinite effect given by another kit. | false | |
| permissions | true or false whether the kit should remove all kit-applied permissions before applying itself. This will not remove all of the player's permissions, only the ones that may have been previously granted by another kit. | false | |
| inheritance | parent | This defines the name of the kit that this kit will consider to be its parent. Parent kits will impart on their children all of their items, effects, permissions, and attributes, but they cannot override anything explicitly defined by the child. IMPORTANT: setting this attribute to "none" will not disable it, but will make it point to the kit named "none". To make a kit have no parent, remove this attribute entirely. | none |
| upgrade | true or false whether this kit should automatically seek to upgrade items that are already in the inventory of the player receiving it. When upgrading, the kit will try to meld the enchantments of similar weapons, and replace other item stacks with its own stacks if its own have more of the item. | false | |
| inheritParentPerms | true or false whether this kit should accept its parent's permission when calculating perms. Having permission for a parent kit will automatically grant permission for any child kits that have this option set to true. | true | |
| requireParentPerms | true or false whether this kit should require its parent's permissions when calculating perms. Having permission for a parent kit is required to get permission for any child kits that have this option set to true. | false | |
| economy | cost | This is the amount of currency that is required to purchase this kit. If the kit is successfully taken, the currency required will be subtracted from the player's account. | 0.0 |
| cash | This is the amount of currency that is included as a part of this kit. If the kit is successfully taken, the currency included will be added to the player's account. | 0.0 | |
| showInList | true or false whether this kit should be shown in /kitlist. If true, no player will be able to see this kit in /kitlist. | true | |
| restrictions | armor | true or false whether this kit should prevent the player from removing/replacing their armor manually. | false |
| drops | true or false whether this kit should prevent the player from being able to drop items. | false | |
| deathDrops | true or false whether this kit should prevent the player from dropping their items on death. | false | |
| pickups | true or false whether this kit should prevent the player from picking up item drops. | false | |
| otherKits | true or false whether this kit should prevent the player from taking other kits. IMPORTANT: since ordinary taking of other kits will not be permitted, other kits with the clear.all attribute will not be able to remove this attribute. Use with caution. | false | |
| identifier | This is a unique identifier for the kit, similar to its name. This is intended for 3rd-party plugin use, so that plugins can keep track of what kit a player has without requiring the kit to have a different visible name. Plugins that hook into KitMaster may require you to set this value to something that they will recognize. | none |
Using individual files
You can also define kits by giving each its own file. To give a kit its own file, use a plain-text editor (like NotePad for Windows, TextEdit for Mac, or Sublime Text 2 for both) to type up the contents of the kit as shown above, without including the name of the kit. When you're done that, save the file with the desired name of the kit as the file name, and the extension .kit. For example, to save the kit called Soldier in its own file, I would put the contents of the kit in a file name Soldier.kit and place it in the directory KitMaster/kits.