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, waitMethods inherited from interface net.minestom.server.event.trait.EntityInstanceEvent
getInstanceMethods inherited from interface net.minestom.server.event.trait.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
-