public class PlayerInteractEvent extends Object implements PlayerEvent, Cancellable
| Modifier and Type | Class and Description |
|---|---|
static class |
PlayerInteractEvent.Action |
| Constructor and Description |
|---|
PlayerInteractEvent(Player player,
ItemStack item,
Block block,
com.flowpowered.math.vector.Vector3f touch,
BlockFace face) |
PlayerInteractEvent(Player player,
ItemStack 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() |
ItemStack |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancelpublic PlayerInteractEvent(Player player, ItemStack item, Block block, com.flowpowered.math.vector.Vector3f touch, BlockFace face)
public PlayerInteractEvent(Player player, ItemStack item, Block block, com.flowpowered.math.vector.Vector3f touch, BlockFace face, PlayerInteractEvent.Action action)
public ItemStack 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–2020 NukkitX. All rights reserved.