public class PlayerInteractEvent extends Object implements PlayerEvent, Cancellable
| Modifier and Type | Class and Description |
|---|---|
static class |
PlayerInteractEvent.Action |
| Constructor and Description |
|---|
PlayerInteractEvent(Player player,
ItemInstance item,
Block block,
com.flowpowered.math.vector.Vector3f touch,
BlockFace face) |
PlayerInteractEvent(Player player,
ItemInstance item,
Block block,
com.flowpowered.math.vector.Vector3f touch,
BlockFace face,
PlayerInteractEvent.Action action) |
| Modifier and Type | Method and Description |
|---|---|
PlayerInteractEvent.Action |
getAction() |
BlockFace |
getBlockFace() |
Block |
getBlockTouched() |
ItemInstance |
getItem() |
Player |
getPlayer()
Get the player in question.
|
com.flowpowered.math.vector.Vector3f |
getTouchVector() |
boolean |
isCancelled()
Whether or not to cancel the event.
|
void |
setCancelled(boolean cancelled)
Decides whether to cancel the event.
|
public PlayerInteractEvent(Player player, ItemInstance item, Block block, com.flowpowered.math.vector.Vector3f touch, BlockFace face)
public PlayerInteractEvent(Player player, ItemInstance item, Block block, com.flowpowered.math.vector.Vector3f touch, BlockFace face, PlayerInteractEvent.Action action)
public ItemInstance getItem()
public BlockFace getBlockFace()
public PlayerInteractEvent.Action getAction()
public Block getBlockTouched()
public com.flowpowered.math.vector.Vector3f getTouchVector()
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–2019 NukkitX. All rights reserved.