Class PlayerFinishDiggingEvent
java.lang.Object
net.minestom.server.event.player.PlayerFinishDiggingEvent
- All Implemented Interfaces:
Event, BlockEvent, EntityEvent, EntityInstanceEvent, InstanceEvent, PlayerEvent, PlayerInstanceEvent
Called when a
Player successfully finishes digging a block-
Constructor Summary
ConstructorsConstructorDescriptionPlayerFinishDiggingEvent(Player player, Instance instance, Block block, BlockVec blockPosition) -
Method Summary
Modifier and TypeMethodDescriptiongetBlock()Gets the block which was dug.Gets the block position.Gets the instance.Gets the player.voidChanges which block was dugMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PlayerEvent
getEntity
-
Constructor Details
-
PlayerFinishDiggingEvent
-
-
Method Details
-
getInstance
Description copied from interface:InstanceEventGets the instance.- Specified by:
getInstancein interfaceEntityInstanceEvent- Specified by:
getInstancein interfaceInstanceEvent- Returns:
- instance
-
setBlock
Changes which block was dugThis has somewhat odd behavior; If you set it from a previously solid block to a non-solid block then cancel the respective
PlayerBlockBreakEventit will allow the player to phase through the block and into the floor (only if the player is standing on top of the block)- Parameters:
block- the block to set the result to
-
getBlock
Gets the block which was dug.- Specified by:
getBlockin interfaceBlockEvent- Returns:
- the block
-
getBlockPosition
Gets the block position.- Specified by:
getBlockPositionin interfaceBlockEvent- Returns:
- the block position
-
getPlayer
Description copied from interface:PlayerEventGets the player.- Specified by:
getPlayerin interfacePlayerEvent- Returns:
- the player
-