Enum Class Limit
- All Implemented Interfaces:
com.github.angeschossen.pluginframework.api.limit.Limit,Serializable,Comparable<Limit>,Constable
public enum Limit
extends Enum<Limit>
implements com.github.angeschossen.pluginframework.api.limit.Limit
Protection-related limits that can be configured per player via permissions or the database.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMaximum amount of blocks a player can protect.Amount of blocks a player can protect for free.Amount of entities a player can protect.Amount of entities a player can protect for free.Amount of groups a player can create.Amount of members a player can add to a protection or group. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable LimitgetByPermission(@NotNull String permission) Look up a limit by its permission node.@NotNull Collection<String> @NotNull StringgetId()@NotNull Collection<@NotNull com.github.angeschossen.pluginframework.api.limit.LimitModifier> intgetModifierValue(@NotNull com.github.angeschossen.pluginframework.api.limit.holder.LimitHolder limitHolder) @NotNull StringGet the permission node associated with the limit.final booleanhasTarget(com.github.angeschossen.pluginframework.api.limit.holder.LimitTarget target) voidregisterModifier(@NotNull com.github.angeschossen.pluginframework.api.limit.LimitModifier... limitModifiers) voidunregisterModifier(@NotNull com.github.angeschossen.pluginframework.api.limit.LimitModifier... limitModifiers) static LimitReturns the enum constant of this class with the specified name.static Limit[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface com.github.angeschossen.pluginframework.api.limit.Limit
applyModifiers
-
Enum Constant Details
-
PLAYER_BLOCKS
Maximum amount of blocks a player can protect. -
PLAYER_BLOCKS_FREE
Amount of blocks a player can protect for free. -
PLAYER_ENTITIES
Amount of entities a player can protect. -
PLAYER_ENTITIES_FREE
Amount of entities a player can protect for free. -
PLAYER_GROUPS
Amount of groups a player can create. -
PROTECTION_MEMBERS
Amount of members a player can add to a protection or group.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getByPermission
Look up a limit by its permission node.- Parameters:
permission- the permission node (case-insensitive)- Returns:
- null, if no limit is associated with this permission
-
hasTarget
public final boolean hasTarget(@NotNull com.github.angeschossen.pluginframework.api.limit.holder.LimitTarget target) - Specified by:
hasTargetin interfacecom.github.angeschossen.pluginframework.api.limit.Limit
-
getModifierValue
public int getModifierValue(@NotNull @NotNull com.github.angeschossen.pluginframework.api.limit.holder.LimitHolder limitHolder) - Specified by:
getModifierValuein interfacecom.github.angeschossen.pluginframework.api.limit.Limit
-
registerModifier
public void registerModifier(@NotNull @NotNull com.github.angeschossen.pluginframework.api.limit.LimitModifier... limitModifiers) - Specified by:
registerModifierin interfacecom.github.angeschossen.pluginframework.api.limit.Limit
-
unregisterModifier
public void unregisterModifier(@NotNull @NotNull com.github.angeschossen.pluginframework.api.limit.LimitModifier... limitModifiers) - Specified by:
unregisterModifierin interfacecom.github.angeschossen.pluginframework.api.limit.Limit
-
getModifiers
@NotNull public @NotNull Collection<@NotNull com.github.angeschossen.pluginframework.api.limit.LimitModifier> getModifiers()- Specified by:
getModifiersin interfacecom.github.angeschossen.pluginframework.api.limit.Limit
-
getConfigAliases
- Specified by:
getConfigAliasesin interfacecom.github.angeschossen.pluginframework.api.limit.Limit
-
getId
- Specified by:
getIdin interfacecom.github.angeschossen.pluginframework.api.limit.Limit
-
getPermission
Get the permission node associated with the limit.- Returns:
- never null
-