Package wtf.choco.arrows.arrow
Class AlchemicalArrowExplosive
java.lang.Object
wtf.choco.arrows.api.AlchemicalArrow
wtf.choco.arrows.arrow.ConfigurableAlchemicalArrow
wtf.choco.arrows.arrow.AlchemicalArrowExplosive
public class AlchemicalArrowExplosive extends ConfigurableAlchemicalArrow
-
Field Summary
Fields Modifier and Type Field Description static ArrowPropertyPROPERTY_EXPLOSION_STRENGTHstatic ArrowPropertyPROPERTY_FUSE_TICKSstatic ArrowPropertyPROPERTY_IGNITE_CREEPERS -
Constructor Summary
Constructors Constructor Description AlchemicalArrowExplosive(AlchemicalArrows plugin) -
Method Summary
Modifier and Type Method Description AlchemicalArrowEntitycreateNewArrow(org.bukkit.entity.Arrow arrow)Create a new instance of anAlchemicalArrowEntity.voidonHitEntity(@NotNull AlchemicalArrowEntity arrow, @NotNull org.bukkit.entity.Entity entity)Called when the arrow hits an entity (this excludes Players.voidtick(AlchemicalArrowEntity arrow, org.bukkit.Location location)Called 20 times every second.Methods inherited from class wtf.choco.arrows.arrow.ConfigurableAlchemicalArrow
getDisplayName, getItem, getKey, onShootFromPlayer, reloadMethods inherited from class wtf.choco.arrows.api.AlchemicalArrow
createItemStack, createItemStack, equals, getProperties, hashCode, hitEntityEventHandler, hitGroundEventHandler, matchesItem, onHitBlock, onHitPlayer, onShootFromBlockSource, onShootFromSkeleton, shootEventHandler
-
Field Details
-
PROPERTY_EXPLOSION_STRENGTH
-
PROPERTY_FUSE_TICKS
-
PROPERTY_IGNITE_CREEPERS
-
-
Constructor Details
-
AlchemicalArrowExplosive
-
-
Method Details
-
tick
Description copied from class:AlchemicalArrowCalled 20 times every second. This method is intended for displaying particles around the arrow, performing tasks whilst the arrow is still in the world, etc.- Overrides:
tickin classAlchemicalArrow- Parameters:
arrow- the alchemical arrow entity instancelocation- the arrow's current location at this tick
-
onHitEntity
public void onHitEntity(@NotNull @NotNull AlchemicalArrowEntity arrow, @NotNull @NotNull org.bukkit.entity.Entity entity)Description copied from class:AlchemicalArrowCalled when the arrow hits an entity (this excludes Players. For Players, seeAlchemicalArrow.onHitPlayer(AlchemicalArrowEntity, Player))- Overrides:
onHitEntityin classAlchemicalArrow- Parameters:
arrow- the alchemical arrow entity instanceentity- the entity damaged by the arrow
-
createNewArrow
Description copied from class:AlchemicalArrowCreate a new instance of anAlchemicalArrowEntity. If a custom AlchemicalArrowEntity implementation is used, this method must be overridden to return a custom instance of it. Under no circumstance should additional, non-arrow entity-related code be executed in an overridden implementation of this method. For additional logic, see AlchemicalArrow's various methods and override them where required- Overrides:
createNewArrowin classAlchemicalArrow- Parameters:
arrow- the BukkitArrowinstance from which to create an AlchemicalArrowEntity- Returns:
- the new AlchemicalArrowEntity instance of this implementation
-