Interface ToolUseHandler
- All Superinterfaces:
ItemHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
- Author:
- TheBusyBiscuit
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault Class<? extends ItemHandler>This method returns the identifier for thisItemHandler.voidonToolUse(BlockBreakEvent e, ItemStack tool, int fortune, List<ItemStack> drops) This method is called whenever aBlockBreakEventwas fired when using thisSlimefunItemto break aBlock.Methods inherited from interface io.github.thebusybiscuit.slimefun4.api.items.ItemHandler
validate
-
Method Details
-
onToolUse
This method is called whenever aBlockBreakEventwas fired when using thisSlimefunItemto break aBlock.- Parameters:
e- TheBlockBreakEventtool- The tool that was usedfortune- The amount of bonus drops to be expected from the fortuneEnchantment.drops- The dropped items
-
getIdentifier
Description copied from interface:ItemHandlerThis method returns the identifier for thisItemHandler. We use aClassidentifier to group Item Handlers together.- Specified by:
getIdentifierin interfaceItemHandler- Returns:
- The
Classidentifier for thisItemHandler
-