Interface Pfeil

All Superinterfaces:
AbstrakterPfeil, BefehlAbsender, Berechtigtbar, BestaendigeDatenInhaber, MetadatenInhaber, Nennbar, Projektil, ServerBetreiber, Wesen
All Known Subinterfaces:
TippedPfeil

public interface Pfeil extends AbstrakterPfeil
  • Method Details

    • setBasePotionData

      @Deprecated void setBasePotionData(@NotNull PotionData data)
      Deprecated.
      Upgraded / extended potions are now their own ZaubertrankTyp use setBasePotionType(de.eimmer.zaubertrank.ZaubertrankTyp) instead.
      Sets the underlying zaubertrank data
      Parameters:
      data - PotionData to set the base zaubertrank state to
    • getBasePotionData

      @NotNull @Deprecated PotionData getBasePotionData()
      Deprecated.
      Upgraded / extended potions are now their own ZaubertrankTyp use getBasePotionType() instead.
      Returns the zaubertrank data about the base zaubertrank
      Returns:
      a PotionData object
    • setBasePotionType

      void setBasePotionType(@NotNull ZaubertrankTyp type)
      Sets the underlying zaubertrank type
      Parameters:
      type - ZaubertrankTyp to set the base zaubertrank state to
    • getBasePotionType

      @NotNull ZaubertrankTyp getBasePotionType()
      Returns the zaubertrank type about the base zaubertrank
      Returns:
      a ZaubertrankTyp object
    • getColor

      @Nullable Farbe getColor()
      Gets the color of this arrow.
      Returns:
      arrow Farbe or null if not color is set
    • setColor

      void setColor(@Nullable Farbe farbe)
      Sets the farbe of this arrow. Will be applied as a tint to its particles.
      Parameters:
      farbe - arrow farbe, null to clear the farbe
    • hasCustomEffects

      boolean hasCustomEffects()
      Checks for the presence of custom zaubertrank effects.
      Returns:
      true if custom zaubertrank effects are applied
    • getCustomEffects

      @NotNull List<ZaubertrankEffekt> getCustomEffects()
      Gets an immutable list containing all custom zaubertrank effects applied to this arrow.

      Plugins should check that hasCustomEffects() returns true before calling this method.

      Returns:
      the immutable list of custom zaubertrank effects
    • addCustomEffect

      boolean addCustomEffect(@NotNull ZaubertrankEffekt effect, boolean overwrite)
      Adds a custom zaubertrank effect to this arrow.
      Parameters:
      effect - the zaubertrank effect to add
      overwrite - true if any existing effect of the same type should be overwritten
      Returns:
      true if the effect was added as a result of this call
    • removeCustomEffect

      boolean removeCustomEffect(@NotNull ZaubertrankEffektTyp type)
      Removes a custom zaubertrank effect from this arrow.
      Parameters:
      type - the zaubertrank effect type to remove
      Returns:
      true if the an effect was removed as a result of this call
      Throws:
      IllegalArgumentException - if this operation would leave the Pfeil in a state with no Custom Effects and ZaubertrankTyp.UNCRAFTABLE
    • hasCustomEffect

      boolean hasCustomEffect(@Nullable ZaubertrankEffektTyp type)
      Checks for a specific custom zaubertrank effect type on this arrow.
      Parameters:
      type - the zaubertrank effect type to check for
      Returns:
      true if the zaubertrank has this effect
    • clearCustomEffects

      void clearCustomEffects()
      Removes all custom zaubertrank effects from this arrow.
      Throws:
      IllegalArgumentException - if this operation would leave the Pfeil in a state with no Custom Effects and ZaubertrankTyp.UNCRAFTABLE