public class GamePlayerInteractEvent
extends GamePlayerEvent
public static com.github.lazoyoung.craftgames.api.event.GamePlayerInteractEvent.Companion Companion
public GamePlayerInteractEvent(@NotNull
com.github.lazoyoung.craftgames.impl.game.player.PlayerData playerData,
@NotNull
com.github.lazoyoung.craftgames.impl.game.Game game,
@NotNull
org.bukkit.event.player.PlayerInteractEvent event)
@NotNull public org.bukkit.event.HandlerList getHandlers()
public void setUseInteractedBlock(@NotNull
org.bukkit.event.Event.Result use)
use - the action to take with the interacted blockpublic void setUseItemInHand(@NotNull
org.bukkit.event.Event.Result use)
use - the action to take with the item in hand@NotNull public org.bukkit.event.Event.Result useInteractedBlock()
This controls the action to take with the block (if any) that was clicked on. This event gets processed for all blocks, but most don't have a default action
@NotNull public org.bukkit.event.Event.Result useItemInHand()
This controls the action to take with the item the player is holding. This includes both blocks and items (such as flint and steel or records). When this is set to default, it will be allowed if no action is taken on the interacted block.
@NotNull public org.bukkit.event.block.Action getBlockAction()
Returns the action type of block interaction.
@Nullable public org.bukkit.block.Block getClickedBlock()
Returns the clicked block
@Nullable public org.bukkit.inventory.ItemStack getItemInHand()
Returns the item in hand represented by this event
public void setCancelled(boolean cancel)
@Deprecated public boolean isCancelled()
@JvmStatic @NotNull public static org.bukkit.event.HandlerList getHandlerList()