Class PlayerClickBlockDisplayEvent
java.lang.Object
org.bukkit.event.Event
me.c7dev.dexterity.api.events.PlayerClickBlockDisplayEvent
- All Implemented Interfaces:
Cancellable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerClickBlockDisplayEvent
(Player player, ClickedBlockDisplay clicked, Action action, DexterityDisplay display) Event called when a player has clicked a block display entity -
Method Summary
Modifier and TypeMethodDescriptionRetrieves Action determining if player left or right clickedGets the living block display entityGets the cardinal direction of the face that was clickedReturns the DexterityDisplay if the clicked block display is part of onestatic HandlerList
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 locationGets the player who clicked the block displayGets the location that exists on the surface of the block that is the precise point that the player is looking atdouble
Returns the number of blocks of distance from the surface of the block to the player's eyeReturns a Vector that is perpendicular to the surface of the face of the blockboolean
void
setCancelled
(boolean b) Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerClickBlockDisplayEvent
public PlayerClickBlockDisplayEvent(Player player, ClickedBlockDisplay clicked, Action action, DexterityDisplay display) Event called when a player has clicked a block display entity
-
-
Method Details
-
getPlayer
-
getBlockDisplay
-
getBlockFace
-
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
-
getClickedDisplay
Returns the DexterityDisplay if the clicked block display is part of one- Returns:
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceCancellable
-
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
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:
setCancelled
in interfaceCancellable
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-