Package me.c7dev.dexterity.api.events
Class PlayerClickBlockDisplayEvent
java.lang.Object
org.bukkit.event.Event
me.c7dev.dexterity.api.events.PlayerClickBlockDisplayEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class PlayerClickBlockDisplayEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionPlayerClickBlockDisplayEvent(org.bukkit.entity.Player player, ClickedBlockDisplay clicked, org.bukkit.event.block.Action action, DexterityDisplay display) Event called when a player has clicked a block display entity -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.event.block.ActionRetrieves Action determining if player left or right clickedorg.bukkit.entity.BlockDisplayGets the living block display entityorg.bukkit.block.BlockFaceGets the cardinal direction of the face that was clickedReturns the DexterityDisplay if the clicked block display is part of onestatic org.bukkit.event.HandlerListorg.bukkit.event.HandlerListorg.bukkit.util.VectorReturns a vector relative to the face of the block display with the offset from the click location to the block display face center's locationorg.bukkit.entity.PlayerGets the player who clicked the block displayorg.bukkit.LocationGets the location that exists on the surface of the block that is the precise point that the player is looking atdoubleReturns the number of blocks of distance from the surface of the block to the player's eyeorg.bukkit.util.VectorReturns a Vector that is perpendicular to the surface of the face of the blockbooleanvoidsetCancelled(boolean b) Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerClickBlockDisplayEvent
public PlayerClickBlockDisplayEvent(org.bukkit.entity.Player player, ClickedBlockDisplay clicked, org.bukkit.event.block.Action action, DexterityDisplay display) Event called when a player has clicked a block display entity
-
-
Method Details
-
getPlayer
public org.bukkit.entity.Player getPlayer()Gets the player who clicked the block display- Returns:
-
getBlockDisplay
public org.bukkit.entity.BlockDisplay getBlockDisplay()Gets the living block display entity- Returns:
-
getBlockFace
public org.bukkit.block.BlockFace getBlockFace()Gets the cardinal direction of the face that was clicked- Returns:
-
getPreciseClickLocation
public org.bukkit.Location getPreciseClickLocation()Gets the location that exists on the surface of the block that is the precise point that the player is looking at- Returns:
-
getAction
public org.bukkit.event.block.Action getAction()Retrieves Action determining if player left or right clicked- Returns:
-
getClickedDisplay
Returns the DexterityDisplay if the clicked block display is part of one- Returns:
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
getSurfaceNormal
public org.bukkit.util.Vector getSurfaceNormal()Returns a Vector that is perpendicular to the surface of the face of the block- Returns:
-
getPreciseDistanceFromEye
public double getPreciseDistanceFromEye()Returns the number of blocks of distance from the surface of the block to the player's eye- Returns:
-
getOffsetFromFaceCenter
public org.bukkit.util.Vector getOffsetFromFaceCenter()Returns a vector relative to the face of the block display with the offset from the click location to the block display face center's location- Returns:
-
setCancelled
public void setCancelled(boolean b) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-