public class PlayerItemHeldEvent extends Object implements PlayerEvent, Cancellable
| Constructor and Description |
|---|
PlayerItemHeldEvent(Player player,
ItemInstance item,
int slot) |
| Modifier and Type | Method and Description |
|---|---|
ItemInstance |
getItem() |
Player |
getPlayer()
Get the player in question.
|
int |
getSlot() |
boolean |
isCancelled()
Whether or not to cancel the event.
|
void |
setCancelled(boolean cancelled)
Decides whether to cancel the event.
|
public PlayerItemHeldEvent(Player player, ItemInstance item, int slot)
public ItemInstance getItem()
public int getSlot()
public Player getPlayer()
PlayerEventgetPlayer in interface PlayerEventpublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancelled)
CancellablesetCancelled in interface Cancellablecancelled - true to cancel the event.Copyright © 2017–2018 NukkitX. All rights reserved.