Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.event.enchantment.PrepareItemEnchantEvent Class Reference

Called when an ItemStack is inserted in an enchantment table - can be called multiple times. More...

+ Inheritance diagram for org.bukkit.event.enchantment.PrepareItemEnchantEvent:
+ Collaboration diagram for org.bukkit.event.enchantment.PrepareItemEnchantEvent:

Public Member Functions

 PrepareItemEnchantEvent (final Player enchanter, InventoryView view, final Block table, final ItemStack item, final int[] levelsOffered, final int bonus)
 
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[] getExpLevelCostsOffered ()
 Get list of offered exp level costs of the enchantment (modify values to change offer)
 
int getEnchantmentBonus ()
 Get enchantment bonus in effect - corresponds to number of bookshelves.
 
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< HumanEntitygetViewers ()
 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 ()
 
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
 

Detailed Description

Called when an ItemStack is inserted in an enchantment table - can be called multiple times.

Definition at line 14 of file PrepareItemEnchantEvent.java.

Constructor & Destructor Documentation

org.bukkit.event.enchantment.PrepareItemEnchantEvent.PrepareItemEnchantEvent ( final Player  enchanter,
InventoryView  view,
final Block  table,
final ItemStack  item,
final int[]  levelsOffered,
final int  bonus 
)

Definition at line 23 of file PrepareItemEnchantEvent.java.

Member Function Documentation

Block org.bukkit.event.enchantment.PrepareItemEnchantEvent.getEnchantBlock ( )

Gets the block being used to enchant the item.

Returns
the block used for enchanting

Definition at line 47 of file PrepareItemEnchantEvent.java.

Player org.bukkit.event.enchantment.PrepareItemEnchantEvent.getEnchanter ( )

Gets the player enchanting the item.

Returns
enchanting player

Definition at line 38 of file PrepareItemEnchantEvent.java.

int org.bukkit.event.enchantment.PrepareItemEnchantEvent.getEnchantmentBonus ( )

Get enchantment bonus in effect - corresponds to number of bookshelves.

Returns
enchantment bonus

Definition at line 72 of file PrepareItemEnchantEvent.java.

int [] org.bukkit.event.enchantment.PrepareItemEnchantEvent.getExpLevelCostsOffered ( )

Get list of offered exp level costs of the enchantment (modify values to change offer)

Returns
experience level costs offered

Definition at line 64 of file PrepareItemEnchantEvent.java.

static HandlerList org.bukkit.event.enchantment.PrepareItemEnchantEvent.getHandlerList ( )
static

Definition at line 89 of file PrepareItemEnchantEvent.java.

HandlerList org.bukkit.event.enchantment.PrepareItemEnchantEvent.getHandlers ( )
virtual

Implements org.bukkit.event.Event.

Definition at line 85 of file PrepareItemEnchantEvent.java.

ItemStack org.bukkit.event.enchantment.PrepareItemEnchantEvent.getItem ( )

Gets the item to be enchanted (can be modified)

Returns
ItemStack of item

Definition at line 56 of file PrepareItemEnchantEvent.java.

boolean org.bukkit.event.enchantment.PrepareItemEnchantEvent.isCancelled ( )

Definition at line 76 of file PrepareItemEnchantEvent.java.

void org.bukkit.event.enchantment.PrepareItemEnchantEvent.setCancelled ( boolean  cancel)

Definition at line 80 of file PrepareItemEnchantEvent.java.


The documentation for this class was generated from the following file: