Interface BowShootHandler
- 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.
This
ItemHandler is triggered when the SlimefunItem it was assigned to
is a SlimefunBow and an Arrow fired from this bow hit a LivingEntity.- Author:
- TheBusyBiscuit
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault Class<? extends ItemHandler> This method returns the identifier for thisItemHandler.voidonHit(org.bukkit.event.entity.EntityDamageByEntityEvent e, org.bukkit.entity.LivingEntity n) default Optional<IncompatibleItemHandlerException> validate(SlimefunItem item) This method is used to check whether a givenSlimefunItemis compatible with thisItemHandler, it will return anIncompatibleItemHandlerExceptionif the items are not compatible.
-
Method Details
-
onHit
void onHit(org.bukkit.event.entity.EntityDamageByEntityEvent e, org.bukkit.entity.LivingEntity n) -
validate
Description copied from interface:ItemHandlerThis method is used to check whether a givenSlimefunItemis compatible with thisItemHandler, it will return anIncompatibleItemHandlerExceptionif the items are not compatible.- Specified by:
validatein interfaceItemHandler- Parameters:
item- TheSlimefunItemto validate- Returns:
- An
Optionaldescribing the result, it will contain anIncompatibleItemHandlerExceptionshould there be an issue
-
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
-