Class SimpleBlockBreakHandler
java.lang.Object
io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler
io.github.thebusybiscuit.slimefun4.implementation.handlers.SimpleBlockBreakHandler
- All Implemented Interfaces:
ItemHandler
This simple implementation of
BlockBreakHandler
will execute the same code
for when the Block
is broken by a Player
, by a MinerAndroid
or an explosion.
By default, both androids and explosions are allowed.- Author:
- TheBusyBiscuit
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
abstract void
This method is called when aBlock
of this type is broken by aPlayer
, by aMinerAndroid
or through an explosion.void
void
onPlayerBreak
(BlockBreakEvent e, ItemStack item, List<ItemStack> drops) Methods inherited from class io.github.thebusybiscuit.slimefun4.core.handlers.BlockBreakHandler
getIdentifier, isAndroidAllowed, isExplosionAllowed
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.thebusybiscuit.slimefun4.api.items.ItemHandler
validate
-
Constructor Details
-
SimpleBlockBreakHandler
protected SimpleBlockBreakHandler()This constructs a newSimpleBlockBreakHandler
.
-
-
Method Details
-
onBlockBreak
This method is called when aBlock
of this type is broken by aPlayer
, by aMinerAndroid
or through an explosion.- Parameters:
b
- The brokenBlock
-
onPlayerBreak
- Specified by:
onPlayerBreak
in classBlockBreakHandler
-
onAndroidBreak
- Overrides:
onAndroidBreak
in classBlockBreakHandler
-
onExplode
- Overrides:
onExplode
in classBlockBreakHandler
-