Interface SlimefunBlockHandler
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface SlimefunBlockHandler
ASlimefunBlockHandler
handles breaking and placing of blocks. You can use this class to initialize block data but also to correctly destroy blocks.SlimefunItem.registerBlockHandler(String, SlimefunBlockHandler);
- Author:
- TheBusyBiscuit
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
onBreak(Player p, Block b, SlimefunItem item, UnregisterReason reason)
This method gets called when theBlock
is broken.default void
onPlace(Player p, Block b, SlimefunItem item)
This method gets called when theBlock
is placed.
-
-
-
Method Detail
-
onPlace
default void onPlace(Player p, Block b, SlimefunItem item)
This method gets called when theBlock
is placed. Use this method to initialize block data.- Parameters:
p
- ThePlayer
who placed itb
- TheBlock
that was placeditem
- TheSlimefunItem
that will be stored inside theBlock
-
onBreak
boolean onBreak(Player p, Block b, SlimefunItem item, UnregisterReason reason)
-
-