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
    boolean equals​(Object object)  
    @NotNull org.bukkit.entity.Arrow getArrow()
    Get this AlchemicalArrowEntity's wrapped Arrow instance, its underlying instance
    @NotNull AlchemicalArrow getImplementation()
    Get this AlchemicalArrowEntity's implementation (i.e.
    @NotNull org.bukkit.Location getLocation()
    Get the location of this arrow.
    @NotNull org.bukkit.World getWorld()
    Get the world in which this arrow resides.
    int hashCode()  

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • 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 create
      arrow - the Bukkit arrow to wrap
  • Method Details

    • getImplementation

      @NotNull public final @NotNull AlchemicalArrow getImplementation()
      Get this AlchemicalArrowEntity's implementation (i.e. the underlying AlchemicalArrow)
      Returns:
      the alchemical arrow implementation
    • getArrow

      @NotNull public final @NotNull org.bukkit.entity.Arrow getArrow()
      Get this AlchemicalArrowEntity's wrapped Arrow instance, 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 invoking getArrow().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 invoking getArrow().getWorld()
      Returns:
      the arrow's world
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals​(Object object)
      Overrides:
      equals in class Object