Class ConfigurableAlchemicalArrow

java.lang.Object
wtf.choco.arrows.api.AlchemicalArrow
wtf.choco.arrows.arrow.ConfigurableAlchemicalArrow
Direct Known Subclasses:
AlchemicalArrowAir, AlchemicalArrowChain, AlchemicalArrowConfusion, AlchemicalArrowDarkness, AlchemicalArrowDeath, AlchemicalArrowEarth, AlchemicalArrowEnder, AlchemicalArrowExplosive, AlchemicalArrowFire, AlchemicalArrowFrost, AlchemicalArrowGrapple, AlchemicalArrowLife, AlchemicalArrowLight, AlchemicalArrowMagic, AlchemicalArrowMagnetic, AlchemicalArrowNecrotic, AlchemicalArrowWater

public abstract class ConfigurableAlchemicalArrow
extends AlchemicalArrow
  • Method Details

    • getKey

      public org.bukkit.NamespacedKey getKey()
      Description copied from class: AlchemicalArrow
      Get this arrow's unique key.
      Specified by:
      getKey in class AlchemicalArrow
      Returns:
      the unique key
    • getDisplayName

      public String getDisplayName()
      Description copied from class: AlchemicalArrow
      Get the display name of this alchemical arrow. This includes colour codes and formatting. The returned String should be expected in messages sent to players
      Specified by:
      getDisplayName in class AlchemicalArrow
      Returns:
      the arrow's display name
    • getItem

      public org.bukkit.inventory.ItemStack getItem()
      Description copied from class: AlchemicalArrow
      Get the item representation of this alchemical arrow. The type must be be tagged by Tag.ITEMS_ARROWS, otherwise an exception will be thrown at registration.

      NOTE: This item does NOT have applied the NamespacedKey for this arrow and cannot be shot unless AlchemicalArrow.matchesItem(ItemStack) is overridden by implementation. Callers should prefer instead to call AlchemicalArrow.createItemStack(). This method is expected to be overridden by implementations, NOT to be called by API.

      Specified by:
      getItem in class AlchemicalArrow
      Returns:
      the arrow item
    • onShootFromPlayer

      public boolean onShootFromPlayer​(AlchemicalArrowEntity arrow, org.bukkit.entity.Player player)
      Description copied from class: AlchemicalArrow
      Called at low priority when a player has successfully shot this alchemical arrow, but it has yet to be registered. Such that this method returns true, the alchemical arrow will be launched
      Overrides:
      onShootFromPlayer in class AlchemicalArrow
      Parameters:
      arrow - the alchemical arrow entity instance
      player - the player that shot the arrow
      Returns:
      whether the shot should be permitted or not
    • reload

      public void reload()