Class CosmeticDefinition.Builder

java.lang.Object
dev.itsharshxd.zentrix.api.cosmetics.CosmeticDefinition.Builder
Enclosing class:
CosmeticDefinition

public static final class CosmeticDefinition.Builder extends Object
  • Method Details

    • name

      @NotNull public @NotNull CosmeticDefinition.Builder name(@NotNull @NotNull String name)
      The display name, in Zentrix's colour format; the ID when not set.
    • icon

      @NotNull public @NotNull CosmeticDefinition.Builder icon(@NotNull @NotNull org.bukkit.inventory.ItemStack icon)
      The icon menus show; copied. Paper when not set.
    • lore

      @NotNull public @NotNull CosmeticDefinition.Builder lore(@NotNull @NotNull List<String> lore)
      The description lines, in Zentrix's colour format.
    • rarity

      @NotNull public @NotNull CosmeticDefinition.Builder rarity(@Nullable @Nullable String rarity)
      The rarity label, in Zentrix's colour format, or null for none.
    • permission

      @NotNull public @NotNull CosmeticDefinition.Builder permission(@Nullable @Nullable String permission)
      The permission that unlocks it without owning it, or null for none.
    • price

      @NotNull public @NotNull CosmeticDefinition.Builder price(double price)
      What it costs in Zentrix's currency.
      Parameters:
      price - zero or more; zero makes it free to claim
      Throws:
      IllegalArgumentException - when the price is negative or not a finite number
    • notForSale

      @NotNull public @NotNull CosmeticDefinition.Builder notForSale()
      Takes it off sale; the default.
    • unlockedByDefault

      @NotNull public @NotNull CosmeticDefinition.Builder unlockedByDefault(boolean unlockedByDefault)
      Whether every player may use it without owning it; false when not set.
    • build

      @NotNull public @NotNull CosmeticDefinition build()