Interface WitherProof
- All Superinterfaces:
ItemAttribute
- All Known Implementing Classes:
HardenedGlass,WitherProofBlock
This Interface, when attached to a class that inherits from
SlimefunItem, marks
the Item as "Wither-Proof".
Wither-Proof blocks cannot be destroyed by a Wither.- Author:
- TheBusyBiscuit
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidonAttack(org.bukkit.block.Block block, org.bukkit.entity.Wither wither) This method is called when aWithertried to attack the givenBlock.default voidonAttackEvent(org.bukkit.event.entity.EntityChangeBlockEvent event) This method is called when aWithertried to attack the block.Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.ItemAttribute
getId
-
Method Details
-
onAttack
void onAttack(@Nonnull org.bukkit.block.Block block, @Nonnull org.bukkit.entity.Wither wither) This method is called when aWithertried to attack the givenBlock. You can use this method to play particles or even damage theWither. This method is only called fromonAttackEvent(EntityChangeBlockEvent)- Parameters:
block- TheBlockwhich was attacked.wither- TheWitherwho attacked.
-
onAttackEvent
default void onAttackEvent(org.bukkit.event.entity.EntityChangeBlockEvent event) This method is called when aWithertried to attack the block. You can use this method to handle theEntityChangeBlockEvent.- Parameters:
event- TheEntityChangeBlockEventwhich was involved.
-