Package net.minestom.server.event.player
Class PlayerPickBlockEvent
java.lang.Object
net.minestom.server.event.player.PlayerPickBlockEvent
- All Implemented Interfaces:
Event
,BlockEvent
,EntityEvent
,EntityInstanceEvent
,InstanceEvent
,PlayerEvent
,PlayerInstanceEvent
Called when a player tries to pick a block (middle-click).
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerPickBlockEvent
(@NotNull Player player, @NotNull Block block, @NotNull BlockVec blockPosition, boolean includeData) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minestom.server.event.trait.EntityInstanceEvent
getInstance
Methods inherited from interface net.minestom.server.event.trait.PlayerEvent
getEntity
-
Constructor Details
-
PlayerPickBlockEvent
-
-
Method Details
-
getBlock
Gets the block which was picked.- Specified by:
getBlock
in interfaceBlockEvent
- Returns:
- the block which was picked
-
getBlockPosition
Gets the picked block position.- Specified by:
getBlockPosition
in interfaceBlockEvent
- Returns:
- the picked block position
-
isIncludeData
public boolean isIncludeData()Get if the entity data should be included in the result (control middle-click).- Returns:
- if the entity data should be included.
-
getPlayer
Description copied from interface:PlayerEvent
Gets the player.- Specified by:
getPlayer
in interfacePlayerEvent
- Returns:
- the player
-