![]() |
Bukkit
1.4.7-R1.0
|
A simple wrapper for ease of selecting Enchantments. More...
Inheritance diagram for org.bukkit.enchantments.EnchantmentWrapper:
Collaboration diagram for org.bukkit.enchantments.EnchantmentWrapper:Public Member Functions | |
| EnchantmentWrapper (int id) | |
| Enchantment | getEnchantment () |
| Gets the enchantment bound to this wrapper. | |
| int | getMaxLevel () |
| Gets the maximum level that this Enchantment may become. | |
| int | getStartLevel () |
| Gets the level that this Enchantment should start at. | |
| EnchantmentTarget | getItemTarget () |
| Gets the type of ItemStack that may fit this Enchantment. | |
| boolean | canEnchantItem (ItemStack item) |
| Checks if this Enchantment may be applied to the given ItemStack. | |
| String | getName () |
| Gets the unique name of this enchantment. | |
| boolean | conflictsWith (Enchantment other) |
| Check if this enchantment conflicts with another enchantment. | |
Public Member Functions inherited from org.bukkit.enchantments.Enchantment | |
| Enchantment (int id) | |
| int | getId () |
| Gets the unique ID of this enchantment. | |
| boolean | equals (Object obj) |
| int | hashCode () |
| String | toString () |
Additional Inherited Members | |
Static Public Member Functions inherited from org.bukkit.enchantments.Enchantment | |
| 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 inherited from org.bukkit.enchantments.Enchantment | |
| 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. | |
A simple wrapper for ease of selecting Enchantments.
Definition at line 8 of file EnchantmentWrapper.java.
| org.bukkit.enchantments.EnchantmentWrapper.EnchantmentWrapper | ( | int | id | ) |
Definition at line 9 of file EnchantmentWrapper.java.
|
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 |
Implements org.bukkit.enchantments.Enchantment.
Definition at line 38 of file EnchantmentWrapper.java.
References org.bukkit.enchantments.Enchantment.canEnchantItem(), and org.bukkit.enchantments.EnchantmentWrapper.getEnchantment().
|
virtual |
Check if this enchantment conflicts with another enchantment.
| other | The enchantment to check against |
Implements org.bukkit.enchantments.Enchantment.
Definition at line 48 of file EnchantmentWrapper.java.
References org.bukkit.enchantments.Enchantment.conflictsWith(), and org.bukkit.enchantments.EnchantmentWrapper.getEnchantment().
| Enchantment org.bukkit.enchantments.EnchantmentWrapper.getEnchantment | ( | ) |
Gets the enchantment bound to this wrapper.
Definition at line 18 of file EnchantmentWrapper.java.
References org.bukkit.enchantments.Enchantment.getById(), and org.bukkit.enchantments.Enchantment.getId().
Referenced by org.bukkit.enchantments.EnchantmentWrapper.canEnchantItem(), org.bukkit.enchantments.EnchantmentWrapper.conflictsWith(), org.bukkit.enchantments.EnchantmentWrapper.getItemTarget(), org.bukkit.enchantments.EnchantmentWrapper.getMaxLevel(), org.bukkit.enchantments.EnchantmentWrapper.getName(), and org.bukkit.enchantments.EnchantmentWrapper.getStartLevel().
|
virtual |
Gets the type of ItemStack that may fit this Enchantment.
Implements org.bukkit.enchantments.Enchantment.
Definition at line 33 of file EnchantmentWrapper.java.
References org.bukkit.enchantments.EnchantmentWrapper.getEnchantment(), and org.bukkit.enchantments.Enchantment.getItemTarget().
|
virtual |
Gets the maximum level that this Enchantment may become.
Implements org.bukkit.enchantments.Enchantment.
Definition at line 23 of file EnchantmentWrapper.java.
References org.bukkit.enchantments.EnchantmentWrapper.getEnchantment(), and org.bukkit.enchantments.Enchantment.getMaxLevel().
|
virtual |
Gets the unique name of this enchantment.
Implements org.bukkit.enchantments.Enchantment.
Definition at line 43 of file EnchantmentWrapper.java.
References org.bukkit.enchantments.EnchantmentWrapper.getEnchantment(), and org.bukkit.enchantments.Enchantment.getName().
|
virtual |
Gets the level that this Enchantment should start at.
Implements org.bukkit.enchantments.Enchantment.
Definition at line 28 of file EnchantmentWrapper.java.
References org.bukkit.enchantments.EnchantmentWrapper.getEnchantment(), and org.bukkit.enchantments.Enchantment.getStartLevel().