![]() |
Bukkit
1.5.2-R1.0
|
Called when an ItemStack is successfully enchanted (currently at enchantment table) More...
Inheritance diagram for org.bukkit.event.enchantment.EnchantItemEvent:
Collaboration diagram for org.bukkit.event.enchantment.EnchantItemEvent:Public Member Functions | |
| EnchantItemEvent (final Player enchanter, final InventoryView view, final Block table, final ItemStack item, final int level, final Map< Enchantment, Integer > enchants, final int i) | |
| Player | getEnchanter () |
| Gets the player enchanting the item. | |
| Block | getEnchantBlock () |
| Gets the block being used to enchant the item. | |
| ItemStack | getItem () |
| Gets the item to be enchanted (can be modified) | |
| int | getExpLevelCost () |
| Get cost in exp levels of the enchantment. | |
| void | setExpLevelCost (int level) |
| Set cost in exp levels of the enchantment. | |
| Map< Enchantment, Integer > | getEnchantsToAdd () |
| Get map of enchantment (levels, keyed by type) to be added to item (modify map returned to change values) Note: Any enchantments not allowed for the item will be ignored. | |
| int | whichButton () |
| Which button was pressed to initiate the enchanting. | |
| boolean | isCancelled () |
| void | setCancelled (boolean cancel) |
| HandlerList | getHandlers () |
Public Member Functions inherited from org.bukkit.event.inventory.InventoryEvent | |
| InventoryEvent (InventoryView transaction) | |
| Inventory | getInventory () |
| Gets the primary Inventory involved in this transaction. | |
| List< HumanEntity > | getViewers () |
| Gets the list of players viewing the primary (upper) inventory involved in this event. | |
| InventoryView | getView () |
| Gets the view object itself. | |
| HandlerList | getHandlers () |
Public Member Functions inherited from org.bukkit.event.Event | |
| Event () | |
| The default constructor is defined for cleaner code. | |
| Event (boolean isAsync) | |
| This constructor is used to explicitly declare an event as synchronous or asynchronous. | |
| String | getEventName () |
| Convenience method for providing a user-friendly identifier. | |
| final boolean | isAsynchronous () |
| Any custom event that should not by synchronized with other events must use the specific constructor. | |
Public Member Functions inherited from org.bukkit.event.Cancellable | |
| boolean | isCancelled () |
| Gets the cancellation state of this event. | |
| void | setCancelled (boolean cancel) |
| Sets the cancellation state of this event. | |
Static Public Member Functions | |
| static HandlerList | getHandlerList () |
Static Public Member Functions inherited from org.bukkit.event.inventory.InventoryEvent | |
| static HandlerList | getHandlerList () |
Additional Inherited Members | |
Protected Attributes inherited from org.bukkit.event.inventory.InventoryEvent | |
| InventoryView | transaction |
Called when an ItemStack is successfully enchanted (currently at enchantment table)
Definition at line 18 of file EnchantItemEvent.java.
| org.bukkit.event.enchantment.EnchantItemEvent.EnchantItemEvent | ( | final Player | enchanter, |
| final InventoryView | view, | ||
| final Block | table, | ||
| final ItemStack | item, | ||
| final int | level, | ||
| final Map< Enchantment, Integer > | enchants, | ||
| final int | i | ||
| ) |
Definition at line 28 of file EnchantItemEvent.java.
| Block org.bukkit.event.enchantment.EnchantItemEvent.getEnchantBlock | ( | ) |
Gets the block being used to enchant the item.
Definition at line 53 of file EnchantItemEvent.java.
| Player org.bukkit.event.enchantment.EnchantItemEvent.getEnchanter | ( | ) |
Gets the player enchanting the item.
Definition at line 44 of file EnchantItemEvent.java.
| Map<Enchantment, Integer> org.bukkit.event.enchantment.EnchantItemEvent.getEnchantsToAdd | ( | ) |
Get map of enchantment (levels, keyed by type) to be added to item (modify map returned to change values) Note: Any enchantments not allowed for the item will be ignored.
Definition at line 90 of file EnchantItemEvent.java.
| int org.bukkit.event.enchantment.EnchantItemEvent.getExpLevelCost | ( | ) |
Get cost in exp levels of the enchantment.
Definition at line 71 of file EnchantItemEvent.java.
|
static |
Definition at line 116 of file EnchantItemEvent.java.
|
virtual |
Implements org.bukkit.event.Event.
Definition at line 112 of file EnchantItemEvent.java.
| ItemStack org.bukkit.event.enchantment.EnchantItemEvent.getItem | ( | ) |
Gets the item to be enchanted (can be modified)
Definition at line 62 of file EnchantItemEvent.java.
| boolean org.bukkit.event.enchantment.EnchantItemEvent.isCancelled | ( | ) |
Definition at line 103 of file EnchantItemEvent.java.
| void org.bukkit.event.enchantment.EnchantItemEvent.setCancelled | ( | boolean | cancel | ) |
Definition at line 107 of file EnchantItemEvent.java.
| void org.bukkit.event.enchantment.EnchantItemEvent.setExpLevelCost | ( | int | level | ) |
Set cost in exp levels of the enchantment.
| level | - cost in levels |
Definition at line 80 of file EnchantItemEvent.java.
| int org.bukkit.event.enchantment.EnchantItemEvent.whichButton | ( | ) |
Which button was pressed to initiate the enchanting.
Definition at line 99 of file EnchantItemEvent.java.