![]() |
Bukkit
1.4.7-R1.0
|
The various type of enchantments that may be added to armour or weapons. More...
Inheritance diagram for org.bukkit.enchantments.Enchantment:
Collaboration diagram for org.bukkit.enchantments.Enchantment:Public Member Functions | |
| Enchantment (int id) | |
| int | getId () |
| Gets the unique ID of this enchantment. | |
| abstract String | getName () |
| Gets the unique name of this enchantment. | |
| abstract int | getMaxLevel () |
| Gets the maximum level that this Enchantment may become. | |
| abstract int | getStartLevel () |
| Gets the level that this Enchantment should start at. | |
| abstract EnchantmentTarget | getItemTarget () |
| Gets the type of ItemStack that may fit this Enchantment. | |
| abstract boolean | conflictsWith (Enchantment other) |
| Check if this enchantment conflicts with another enchantment. | |
| abstract boolean | canEnchantItem (ItemStack item) |
| Checks if this Enchantment may be applied to the given ItemStack. | |
| boolean | equals (Object obj) |
| int | hashCode () |
| String | toString () |
Static Public Member Functions | |
| static void | registerEnchantment (Enchantment enchantment) |
| Registers an enchantment with the given ID and object. | |
| static boolean | isAcceptingRegistrations () |
| Checks if this is accepting Enchantment registrations. | |
| static void | stopAcceptingRegistrations () |
| Stops accepting any enchantment registrations. | |
| static Enchantment | getById (int id) |
| Gets the Enchantment at the specified ID. | |
| static Enchantment | getByName (String name) |
| Gets the Enchantment at the specified name. | |
| static Enchantment[] | values () |
| Gets an array of all the registered Enchantments. | |
Static Public Attributes | |
| static final Enchantment | PROTECTION_ENVIRONMENTAL = new EnchantmentWrapper(0) |
| Provides protection against environmental damage. | |
| static final Enchantment | PROTECTION_FIRE = new EnchantmentWrapper(1) |
| Provides protection against fire damage. | |
| static final Enchantment | PROTECTION_FALL = new EnchantmentWrapper(2) |
| Provides protection against fall damage. | |
| static final Enchantment | PROTECTION_EXPLOSIONS = new EnchantmentWrapper(3) |
| Provides protection against explosive damage. | |
| static final Enchantment | PROTECTION_PROJECTILE = new EnchantmentWrapper(4) |
| Provides protection against projectile damage. | |
| static final Enchantment | OXYGEN = new EnchantmentWrapper(5) |
| Decreases the rate of air loss whilst underwater. | |
| static final Enchantment | WATER_WORKER = new EnchantmentWrapper(6) |
| Increases the speed at which a player may mine underwater. | |
| static final Enchantment | THORNS = new EnchantmentWrapper(7) |
| Damages the attacker. | |
| static final Enchantment | DAMAGE_ALL = new EnchantmentWrapper(16) |
| Increases damage against all targets. | |
| static final Enchantment | DAMAGE_UNDEAD = new EnchantmentWrapper(17) |
| Increases damage against undead targets. | |
| static final Enchantment | DAMAGE_ARTHROPODS = new EnchantmentWrapper(18) |
| Increases damage against arthropod targets. | |
| static final Enchantment | KNOCKBACK = new EnchantmentWrapper(19) |
| All damage to other targets will knock them back when hit. | |
| static final Enchantment | FIRE_ASPECT = new EnchantmentWrapper(20) |
| When attacking a target, has a chance to set them on fire. | |
| static final Enchantment | LOOT_BONUS_MOBS = new EnchantmentWrapper(21) |
| Provides a chance of gaining extra loot when killing monsters. | |
| static final Enchantment | DIG_SPEED = new EnchantmentWrapper(32) |
| Increases the rate at which you mine/dig. | |
| static final Enchantment | SILK_TOUCH = new EnchantmentWrapper(33) |
| Allows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone) | |
| static final Enchantment | DURABILITY = new EnchantmentWrapper(34) |
| Decreases the rate at which a tool looses durability. | |
| static final Enchantment | LOOT_BONUS_BLOCKS = new EnchantmentWrapper(35) |
| Provides a chance of gaining extra loot when destroying blocks. | |
| static final Enchantment | ARROW_DAMAGE = new EnchantmentWrapper(48) |
| Provides extra damage when shooting arrows from bows. | |
| static final Enchantment | ARROW_KNOCKBACK = new EnchantmentWrapper(49) |
| Provides a knockback when an entity is hit by an arrow from a bow. | |
| static final Enchantment | ARROW_FIRE = new EnchantmentWrapper(50) |
| Sets entities on fire when hit by arrows shot from a bow. | |
| static final Enchantment | ARROW_INFINITE = new EnchantmentWrapper(51) |
| Provides infinite arrows when shooting a bow. | |
The various type of enchantments that may be added to armour or weapons.
Definition at line 12 of file Enchantment.java.
| org.bukkit.enchantments.Enchantment.Enchantment | ( | int | id | ) |
Definition at line 128 of file Enchantment.java.
Referenced by org.bukkit.enchantments.Enchantment.equals().
|
pure virtual |
Checks if this Enchantment may be applied to the given ItemStack.
This does not check if it conflicts with any enchantmentds already applied to the item.
| item | Item to test |
Implemented in org.bukkit.enchantments.EnchantmentWrapper.
Referenced by org.bukkit.inventory.ItemStack.addEnchantment(), org.bukkit.enchantments.EnchantmentWrapper.canEnchantItem(), and org.bukkit.command.defaults.EnchantCommand.execute().
|
pure virtual |
Check if this enchantment conflicts with another enchantment.
| other | The enchantment to check against |
Implemented in org.bukkit.enchantments.EnchantmentWrapper.
Referenced by org.bukkit.enchantments.EnchantmentWrapper.conflictsWith(), and org.bukkit.command.defaults.EnchantCommand.execute().
| boolean org.bukkit.enchantments.Enchantment.equals | ( | Object | obj | ) |
Definition at line 187 of file Enchantment.java.
References org.bukkit.enchantments.Enchantment.Enchantment().
Referenced by org.bukkit.command.defaults.EnchantCommand.execute().
|
static |
Gets the Enchantment at the specified ID.
| id | ID to fetch |
Definition at line 252 of file Enchantment.java.
Referenced by org.bukkit.enchantments.EnchantmentWrapper.getEnchantment().
|
static |
Gets the Enchantment at the specified name.
| name | Name to fetch |
Definition at line 262 of file Enchantment.java.
Referenced by org.bukkit.inventory.ItemStack.deserialize().
| int org.bukkit.enchantments.Enchantment.getId | ( | ) |
Gets the unique ID of this enchantment.
Definition at line 137 of file Enchantment.java.
Referenced by org.bukkit.enchantments.EnchantmentWrapper.getEnchantment().
|
pure virtual |
Gets the type of ItemStack that may fit this Enchantment.
Implemented in org.bukkit.enchantments.EnchantmentWrapper.
Referenced by org.bukkit.enchantments.EnchantmentWrapper.getItemTarget().
|
pure virtual |
Gets the maximum level that this Enchantment may become.
Implemented in org.bukkit.enchantments.EnchantmentWrapper.
Referenced by org.bukkit.inventory.ItemStack.addEnchantment(), org.bukkit.command.defaults.EnchantCommand.execute(), and org.bukkit.enchantments.EnchantmentWrapper.getMaxLevel().
|
pure virtual |
Gets the unique name of this enchantment.
Implemented in org.bukkit.enchantments.EnchantmentWrapper.
Referenced by org.bukkit.command.defaults.EnchantCommand.buildEnchantments(), org.bukkit.command.defaults.EnchantCommand.execute(), org.bukkit.enchantments.EnchantmentWrapper.getName(), org.bukkit.enchantments.Enchantment.registerEnchantment(), and org.bukkit.enchantments.Enchantment.toString().
|
pure virtual |
Gets the level that this Enchantment should start at.
Implemented in org.bukkit.enchantments.EnchantmentWrapper.
Referenced by org.bukkit.inventory.ItemStack.addEnchantment(), org.bukkit.command.defaults.EnchantCommand.execute(), and org.bukkit.enchantments.EnchantmentWrapper.getStartLevel().
| int org.bukkit.enchantments.Enchantment.hashCode | ( | ) |
Definition at line 202 of file Enchantment.java.
|
static |
Checks if this is accepting Enchantment registrations.
Definition at line 234 of file Enchantment.java.
Referenced by org.bukkit.enchantments.Enchantment.registerEnchantment().
|
static |
Registers an enchantment with the given ID and object.
Generally not to be used from within a plugin.
| enchantment | Enchantment to register |
Definition at line 218 of file Enchantment.java.
References org.bukkit.enchantments.Enchantment.getName(), and org.bukkit.enchantments.Enchantment.isAcceptingRegistrations().
|
static |
Stops accepting any enchantment registrations.
Definition at line 241 of file Enchantment.java.
References org.bukkit.command.defaults.EnchantCommand.buildEnchantments().
| String org.bukkit.enchantments.Enchantment.toString | ( | ) |
Definition at line 207 of file Enchantment.java.
References org.bukkit.enchantments.Enchantment.getName().
|
static |
Gets an array of all the registered Enchantments.
Definition at line 271 of file Enchantment.java.
Referenced by org.bukkit.command.defaults.EnchantCommand.buildEnchantments().
|
static |
Provides extra damage when shooting arrows from bows.
Definition at line 106 of file Enchantment.java.
|
static |
Sets entities on fire when hit by arrows shot from a bow.
Definition at line 116 of file Enchantment.java.
|
static |
Provides infinite arrows when shooting a bow.
Definition at line 121 of file Enchantment.java.
|
static |
Provides a knockback when an entity is hit by an arrow from a bow.
Definition at line 111 of file Enchantment.java.
|
static |
Increases damage against all targets.
Definition at line 56 of file Enchantment.java.
|
static |
Increases damage against arthropod targets.
Definition at line 66 of file Enchantment.java.
|
static |
Increases damage against undead targets.
Definition at line 61 of file Enchantment.java.
|
static |
Increases the rate at which you mine/dig.
Definition at line 86 of file Enchantment.java.
|
static |
Decreases the rate at which a tool looses durability.
Definition at line 96 of file Enchantment.java.
|
static |
When attacking a target, has a chance to set them on fire.
Definition at line 76 of file Enchantment.java.
|
static |
All damage to other targets will knock them back when hit.
Definition at line 71 of file Enchantment.java.
|
static |
Provides a chance of gaining extra loot when destroying blocks.
Definition at line 101 of file Enchantment.java.
|
static |
Provides a chance of gaining extra loot when killing monsters.
Definition at line 81 of file Enchantment.java.
|
static |
Decreases the rate of air loss whilst underwater.
Definition at line 41 of file Enchantment.java.
|
static |
Provides protection against environmental damage.
Definition at line 16 of file Enchantment.java.
|
static |
Provides protection against explosive damage.
Definition at line 31 of file Enchantment.java.
|
static |
Provides protection against fall damage.
Definition at line 26 of file Enchantment.java.
|
static |
Provides protection against fire damage.
Definition at line 21 of file Enchantment.java.
|
static |
Provides protection against projectile damage.
Definition at line 36 of file Enchantment.java.
|
static |
Allows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone)
Definition at line 91 of file Enchantment.java.
|
static |
Damages the attacker.
Definition at line 51 of file Enchantment.java.
|
static |
Increases the speed at which a player may mine underwater.
Definition at line 46 of file Enchantment.java.