Class BlockBreakContext.Destroyed
-
- All Implemented Interfaces:
-
io.github.pylonmc.rebar.block.context.BlockBreakContext
public final class BlockBreakContext.Destroyed implements BlockBreakContext
The block has been destroyed for another reason, such as a lever dropping because the block it was attached to was broken. It is not really documented exactly when the event that this relies on is actually fired for some reason.
Unfortunate quirk of Paper/Spigot/Bukkit/Mojang that this is needed.
See BlockDestroyEvent for more details
-
-
Constructor Summary
Constructors Constructor Description BlockBreakContext.Destroyed(BlockDestroyEvent event)
-
Method Summary
Modifier and Type Method Description final BlockDestroyEventgetEvent()BlockgetBlock()The block that is about to be broken. BooleangetNormallyDrops()Determines the default drop behavior of the context BooleanshouldSetToAir()If true, the block will be set to air after the Rebar data is removed -
-
Constructor Detail
-
BlockBreakContext.Destroyed
BlockBreakContext.Destroyed(BlockDestroyEvent event)
-
-
Method Detail
-
getEvent
final BlockDestroyEvent getEvent()
-
getNormallyDrops
Boolean getNormallyDrops()
Determines the default drop behavior of the context
-
shouldSetToAir
Boolean shouldSetToAir()
If true, the block will be set to air after the Rebar data is removed
-
-
-
-