Package me.c7dev.dexterity.api.events
Class PlayerPlaceBlockDisplayEvent
java.lang.Object
org.bukkit.event.Event
me.c7dev.dexterity.api.events.PlayerPlaceBlockDisplayEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class PlayerPlaceBlockDisplayEvent
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
ConstructorsConstructorDescriptionPlayerPlaceBlockDisplayEvent(org.bukkit.entity.Player player, ClickedBlockDisplay clicked, org.bukkit.block.data.BlockData blockData) Event called when a player has clicked a block display entity -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.block.data.BlockDataReturns the metadata of the block type that is about to be placedorg.bukkit.entity.BlockDisplayGets the living block display entity that the new display will be placed onorg.bukkit.block.BlockFaceGets the cardinal direction of the block display face that was clickedorg.bukkit.LocationGets the location of the center of the clicked block displaystatic org.bukkit.event.HandlerListorg.bukkit.event.HandlerListorg.bukkit.entity.PlayerGets the player who clicked the block displayorg.bukkit.LocationGets the location that exists on the surface of the clicked 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 eyebooleanvoidsetCancelled(boolean b) Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerPlaceBlockDisplayEvent
public PlayerPlaceBlockDisplayEvent(org.bukkit.entity.Player player, ClickedBlockDisplay clicked, org.bukkit.block.data.BlockData blockData) 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:
-
getBlockDataToPlace
public org.bukkit.block.data.BlockData getBlockDataToPlace()Returns the metadata of the block type that is about to be placed- Returns:
-
getClickedBlockDisplay
public org.bukkit.entity.BlockDisplay getClickedBlockDisplay()Gets the living block display entity that the new display will be placed on- Returns:
-
getClickedBlockFace
public org.bukkit.block.BlockFace getClickedBlockFace()Gets the cardinal direction of the block display face that was clicked- Returns:
-
getPreciseClickLocation
public org.bukkit.Location getPreciseClickLocation()Gets the location that exists on the surface of the clicked block that is the precise point that the player is looking at- Returns:
-
getClickedLocation
public org.bukkit.Location getClickedLocation()Gets the location of the center of the clicked block display- Returns:
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
getPreciseDistanceFromEye
public double getPreciseDistanceFromEye()Returns the number of blocks of distance from the surface of the block to the player's eye- 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()
-