Cancellablepublic class PlayerItemMendEvent extends PlayerEvent implements Cancellable
PlayerExpChangeEvent, and the
results of this event directly affect the PlayerExpChangeEvent.Event.Resultplayer| Constructor | Description |
|---|---|
PlayerItemMendEvent(Player who,
ItemStack item,
ExperienceOrb experienceOrb,
int repairAmount) |
| Modifier and Type | Method | Description |
|---|---|---|
ExperienceOrb |
getExperienceOrb() |
Get the experience orb triggering the event.
|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
ItemStack |
getItem() |
Get the
ItemStack to be repaired. |
int |
getRepairAmount() |
Get the amount the item is to be repaired.
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancelled) |
Sets the cancellation state of this event.
|
void |
setRepairAmount(int amount) |
Set the amount the item will be repaired.
|
getEventName, isAsynchronousclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPlayerpublic PlayerItemMendEvent(Player who, ItemStack item, ExperienceOrb experienceOrb, int repairAmount)
public ItemStack getItem()
ItemStack to be repaired.
This is not necessarily the item the player is holding.public ExperienceOrb getExperienceOrb()
public int getRepairAmount()
public void setRepairAmount(int amount)
amount - how much damage will be repaired on the itempublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancelled)
CancellablesetCancelled in interface Cancellablecancelled - true if you wish to cancel this eventpublic HandlerList getHandlers()
getHandlers in class Eventpublic static HandlerList getHandlerList()
Copyright © 2018. All rights reserved.