Package dev.itsharshxd.zentrix.api.perk
Class PerkDefinition.Builder
java.lang.Object
dev.itsharshxd.zentrix.api.perk.PerkDefinition.Builder
- Enclosing class:
PerkDefinition
Builds a
PerkDefinition.-
Method Summary
Modifier and TypeMethodDescription@NotNull PerkDefinitionbuild()Builds the definition.@NotNull PerkDefinition.BuilderMarks the definition as a built-in perk's.@NotNull PerkDefinition.BuilderdefaultValue(boolean allowed) The server-wide default of a toggle perk.@NotNull PerkDefinition.BuilderdefaultValue(int value) The server-wide default of a number perk;PerkDefinition.UNLIMITEDwhere supported.@NotNull PerkDefinition.Builderdescription(@NotNull String... lines) What the perk does, one line each.@NotNull PerkDefinition.BuilderdisplayName(@NotNull String displayName) The name players read; color codes are allowed.@NotNull PerkDefinition.Buildericon(@NotNull org.bukkit.Material icon) The item the perk wears in menus; paper unless set.@NotNull PerkDefinition.Buildermaximum(int maximum) The highest a number perk can be; unbounded unless set.@NotNull PerkDefinition.Builderminimum(int minimum) The lowest a number perk can be; 0 unless set.@NotNull PerkDefinition.Builderunlimited(boolean supported) Whether a number perk acceptsPerkDefinition.UNLIMITED.
-
Method Details
-
defaultValue
The server-wide default of a number perk;PerkDefinition.UNLIMITEDwhere supported. -
defaultValue
The server-wide default of a toggle perk. -
minimum
The lowest a number perk can be; 0 unless set. -
maximum
The highest a number perk can be; unbounded unless set. -
unlimited
Whether a number perk acceptsPerkDefinition.UNLIMITED. -
displayName
The name players read; color codes are allowed. The key unless set. -
icon
The item the perk wears in menus; paper unless set. -
description
What the perk does, one line each. -
builtIn
Marks the definition as a built-in perk's. Used by Zentrix itself. -
build
Builds the definition.- Throws:
IllegalArgumentException- when an addon key is not namespaced asPerkDefinition.isValidAddonKey(java.lang.String)describes, or the bounds or default do not fit together
-