org.bukkit.event.enchantment
public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellable
Event.Resulttransaction| Constructor and Description | 
|---|
PrepareItemEnchantEvent(Player enchanter,
                       InventoryView view,
                       Block table,
                       ItemStack item,
                       int[] levelsOffered,
                       int bonus)  | 
| Modifier and Type | Method and Description | 
|---|---|
Block | 
getEnchantBlock()
Gets the block being used to enchant the item 
 | 
Player | 
getEnchanter()
Gets the player enchanting the item 
 | 
int | 
getEnchantmentBonus()
Get enchantment bonus in effect - corresponds to number of bookshelves 
 | 
int[] | 
getExpLevelCostsOffered()
Get list of offered exp level costs of the enchantment (modify values
 to change offer) 
 | 
static HandlerList | 
getHandlerList()  | 
HandlerList | 
getHandlers()  | 
ItemStack | 
getItem()
Gets the item to be enchanted (can be modified) 
 | 
boolean | 
isCancelled()
Gets the cancellation state of this event. 
 | 
void | 
setCancelled(boolean cancel)
Sets the cancellation state of this event. 
 | 
getInventory, getView, getViewersgetEventName, isAsynchronouspublic PrepareItemEnchantEvent(Player enchanter, InventoryView view, Block table, ItemStack item, int[] levelsOffered, int bonus)
public Player getEnchanter()
public Block getEnchantBlock()
public ItemStack getItem()
public int[] getExpLevelCostsOffered()
public int getEnchantmentBonus()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this eventpublic HandlerList getHandlers()
getHandlers in class InventoryEventpublic static HandlerList getHandlerList()
Copyright © 2014. All rights reserved.