Package wtf.choco.arrows.api
Class AlchemicalArrowEntity
java.lang.Object
wtf.choco.arrows.api.AlchemicalArrowEntity
- Direct Known Subclasses:
ArrowEntityFire,ArrowEntityFused,ArrowEntityWater
public class AlchemicalArrowEntity extends Object
Represents an in-world
AlchemicalArrow implementation. This instance wraps a
Bukkit Arrow and may be extended to hold arrow-implementation-specific data.
If this class is extended, the AlchemicalArrow.createNewArrow(Arrow) method
in the AlchemcialArrow implementation must be overwritten to return an instance of
the custom implementation in order to be recognised by the AlchemicalArrows plugin- Author:
- Parker Hawke - Choco
-
Constructor Summary
Constructors Constructor Description AlchemicalArrowEntity(@NotNull AlchemicalArrow implementation, @NotNull org.bukkit.entity.Arrow arrow)Construct a new instance of AlchemicalArrowEntity given a type and arrow -
Method Summary
Modifier and Type Method Description booleanequals(Object object)@NotNull org.bukkit.entity.ArrowgetArrow()Get this AlchemicalArrowEntity's wrappedArrowinstance, its underlying instance@NotNull AlchemicalArrowgetImplementation()Get this AlchemicalArrowEntity's implementation (i.e.@NotNull org.bukkit.LocationgetLocation()Get the location of this arrow.@NotNull org.bukkit.WorldgetWorld()Get the world in which this arrow resides.inthashCode()
-
Constructor Details
-
AlchemicalArrowEntity
public AlchemicalArrowEntity(@NotNull @NotNull AlchemicalArrow implementation, @NotNull @NotNull org.bukkit.entity.Arrow arrow)Construct a new instance of AlchemicalArrowEntity given a type and arrow- Parameters:
implementation- the alchemical arrow implementation to createarrow- the Bukkit arrow to wrap
-
-
Method Details
-
getImplementation
Get this AlchemicalArrowEntity's implementation (i.e. the underlyingAlchemicalArrow)- Returns:
- the alchemical arrow implementation
-
getArrow
@NotNull public final @NotNull org.bukkit.entity.Arrow getArrow()Get this AlchemicalArrowEntity's wrappedArrowinstance, its underlying instance- Returns:
- the wrapped arrow
-
getLocation
@NotNull public final @NotNull org.bukkit.Location getLocation()Get the location of this arrow. This is equivalent to invokinggetArrow().getLocation()- Returns:
- the arrow's location
-
getWorld
@NotNull public final @NotNull org.bukkit.World getWorld()Get the world in which this arrow resides. This is equivalent to invokinggetArrow().getWorld()- Returns:
- the arrow's world
-
hashCode
public int hashCode() -
equals
-