Interface Cosmetic

All Known Subinterfaces:
Hat, ParticleShape, Trail<T>

public interface Cosmetic
Parent Interface for Base Cosmetics, ready for material, particle, or entity implementations.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull String
    Fetches the display name of this cosmetic.
    @NotNull Material
    Fetches the inventory icon of this cosmetic.
    @NotNull String
    Fetches the namespace of this Comsmetic.
    void
    run(@Nullable Location l, @NotNull CosmeticLocation<?> location)
    Runs a CosmeticLocation based on this parent.
  • Method Details

    • getNamespace

      @NotNull @NotNull String getNamespace()
      Fetches the namespace of this Comsmetic.
      Returns:
      Cosmetic Namespace
    • getDisplayName

      @NotNull @NotNull String getDisplayName()
      Fetches the display name of this cosmetic.
      Returns:
      Display name of Cosmetic
    • getIcon

      @NotNull @NotNull Material getIcon()
      Fetches the inventory icon of this cosmetic.
      Returns:
      The Icon of this cosmetic.
    • run

      void run(@Nullable @Nullable Location l, @NotNull @NotNull CosmeticLocation<?> location) throws IllegalArgumentException

      Runs a CosmeticLocation based on this parent.

      Note: Some implementations of this interface have this method deprecated in favor of the first parameter being Entity or a sub-interface. Casting when running this method is recommended.

      Parameters:
      l - Bukkit Location to use at (not necessary for some Cosmetics)
      location - CosmeticLocation to input
      Throws:
      IllegalArgumentException - if location is null or is not supported