Skip to content
chaseoes edited this page Dec 29, 2012 · 3 revisions

Classes are defined in the plugin's config.yml. Here's an example class:

heavy:
  armor:
    helmet: 306.PROTECTION_PROJECTILE-2
    chest: 307.PROTECTION_PROJECTILE-2
    legs: 308.PROTECTION_PROJECTILE-2
    boots: 309.PROTECTION_PROJECTILE-2
  inventory:
  - 267.1.DAMAGE_ALL-1
  - 261.1.ARROW_INFINITE-1
  - 373,32757.5
  - 262.1
  potion-effects:
  - SLOW.1.forever

Let's look at the helmet line to see how you define armor items:

helmet: 306.PROTECTION_PROJECTILE-2

306 is the item ID for the helmet - in this case, it's a iron helmet. An enchantment is then applied by adding an extra period, and the name enchantment, with a dash separating the enchantment level. In this case, a level 2 Projectile Protection enchantment is being applied to the helmet. Follow the same format for adding multiple enchantments:

helmet: 306.PROTECTION_PROJECTILE-2.PROTECTION_FIRE-1

List of acceptable enchantment names:

http://jd.bukkit.org/doxygen/dd/d17/classorg_1_1bukkit_1_1enchantments_1_1Enchantment.html#pub-static-attribs

Inventory Items

Inventory items are given almost exactly like armor is, let's take a look at one:

267.1.DAMAGE_ALL-1

This gives the player 1 iron sword (item ID 267), with a level 1 sharpness enchantment (DAMAGE_ALL is sharpness in-game). The amount of the item is the second number, in this case they should only get 1 as it's a sword. Multiple enchantments get applied like with armor.

Potion Effects

At the bottom is a list of potion effects. These are formatted like so:

SLOW.1.forever

That will give the player a Slowness I potion effect that lasts forever. You can also have them last a certain amount of time, for example, here's Speed II potion effect that lasts for 30 seconds:

SPEED.2.30

List of acceptable potion effect names:

http://jd.bukkit.org/doxygen/d3/d70/classorg_1_1bukkit_1_1potion_1_1PotionEffectType.html#pub-static-attribs