|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bukkit.enchantments.Enchantment org.bukkit.enchantments.EnchantmentWrapper
public class EnchantmentWrapper
A simple wrapper for ease of selecting Enchantment
s
Field Summary |
---|
Fields inherited from class org.bukkit.enchantments.Enchantment |
---|
ARROW_DAMAGE, ARROW_FIRE, ARROW_INFINITE, ARROW_KNOCKBACK, DAMAGE_ALL, DAMAGE_ARTHROPODS, DAMAGE_UNDEAD, DIG_SPEED, DURABILITY, FIRE_ASPECT, KNOCKBACK, LOOT_BONUS_BLOCKS, LOOT_BONUS_MOBS, OXYGEN, PROTECTION_ENVIRONMENTAL, PROTECTION_EXPLOSIONS, PROTECTION_FALL, PROTECTION_FIRE, PROTECTION_PROJECTILE, SILK_TOUCH, THORNS, WATER_WORKER |
Constructor Summary | |
---|---|
EnchantmentWrapper(int id)
|
Method Summary | |
---|---|
boolean |
canEnchantItem(ItemStack item)
Checks if this Enchantment may be applied to the given ItemStack . |
boolean |
conflictsWith(Enchantment other)
Check if this enchantment conflicts with another enchantment. |
Enchantment |
getEnchantment()
Gets the enchantment bound to this wrapper |
EnchantmentTarget |
getItemTarget()
Gets the type of ItemStack that may fit this Enchantment. |
int |
getMaxLevel()
Gets the maximum level that this Enchantment may become. |
String |
getName()
Gets the unique name of this enchantment |
int |
getStartLevel()
Gets the level that this Enchantment should start at |
Methods inherited from class org.bukkit.enchantments.Enchantment |
---|
equals, getById, getByName, getId, hashCode, isAcceptingRegistrations, registerEnchantment, stopAcceptingRegistrations, toString, values |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EnchantmentWrapper(int id)
Method Detail |
---|
public Enchantment getEnchantment()
public int getMaxLevel()
Enchantment
getMaxLevel
in class Enchantment
public int getStartLevel()
Enchantment
getStartLevel
in class Enchantment
public EnchantmentTarget getItemTarget()
Enchantment
ItemStack
that may fit this Enchantment.
getItemTarget
in class Enchantment
public boolean canEnchantItem(ItemStack item)
Enchantment
ItemStack
.
This does not check if it conflicts with any enchantmentds already applied to the item.
canEnchantItem
in class Enchantment
item
- Item to test
public String getName()
Enchantment
getName
in class Enchantment
public boolean conflictsWith(Enchantment other)
Enchantment
conflictsWith
in class Enchantment
other
- The enchantment to check against
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |