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(Player player, Block block, BlockVec blockPosition, boolean includeData) -
Method Summary
Modifier and TypeMethodDescriptiongetBlock()Gets the block which was picked.Gets the picked block position.Gets the player.booleanGet if the entity data should be included in the result (control middle-click).Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EntityInstanceEvent
getInstanceMethods inherited from interface PlayerEvent
getEntity
-
Constructor Details
-
PlayerPickBlockEvent
-
-
Method Details
-
getBlock
Gets the block which was picked.- Specified by:
getBlockin interfaceBlockEvent- Returns:
- the block which was picked
-
getBlockPosition
Gets the picked block position.- Specified by:
getBlockPositionin 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:PlayerEventGets the player.- Specified by:
getPlayerin interfacePlayerEvent- Returns:
- the player
-