Package org.kingdoms.constants.player
Class Rank
- All Implemented Interfaces:
Cloneable,Comparable<Rank>
-
Field Summary
FieldsFields inherited from class org.kingdoms.constants.metadata.KingdomsObject
metadata -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this rank can be promoted.@NonNull Rankclone()intstatic RankMapstatic @Nullable KingdomPlayerdetermineNextKing(@NonNull ArrayList<KingdomPlayer> members, @Nullable Comparator<KingdomPlayer> comparator) boolean@Nullable StringgetColor()@NonNull String@NonNull Stringstatic RankMapstatic Rankstatic @NonNull Rank@NonNull com.cryptomorin.xseries.XMaterialint@Nullable StringgetName()@NonNull StringgetNode()@NonNull Set<KingdomPermission>@org.checkerframework.common.value.qual.IntRange(from=0L, to=2147483647L) intRank priorities start from zero.@Nullable StringinthashCode()booleanhasPermission(KingdomPermission permission) static voidinit()booleanisHigherThan(@NonNull Rank rank) Checks whether this rank has higher priority than the given rank.booleanisKing()voidvoidsetMaterial(com.cryptomorin.xseries.XMaterial material) voidsetMaxClaims(int maxClaims) voidprotected voidvoidsetPermissions(@NonNull Set<KingdomPermission> permissions) protected voidsetPriority(@org.checkerframework.common.value.qual.IntRange(from=0L, to=2147483647L) int priority) voidtoString()Methods inherited from class org.kingdoms.constants.metadata.KingdomsObject
compressBoolean, compressCollecton, compressCollecton, compressColor, compressInventory, compressLocation, compressLocation, compressMap, compressMetadata, compressString, compressUUID, getMetadata, getSaveMeta, setMetadata, setSaveMeta, shouldSave
-
Field Details
-
CUSTOM_RANKS
public static boolean CUSTOM_RANKS
-
-
Constructor Details
-
Rank
-
-
Method Details
-
copyDefaults
-
init
public static void init() -
getDefaultRanks
-
determineNextKing
public static @Nullable KingdomPlayer determineNextKing(@NonNull ArrayList<KingdomPlayer> members, @Nullable Comparator<KingdomPlayer> comparator) -
getHighestRank
-
getLowestRank
-
copyPermissions
-
hasPermission
-
clone
-
compareTo
- Specified by:
compareToin interfaceComparable<Rank>
-
hashCode
public int hashCode() -
getDataKey
- Specified by:
getDataKeyin classKingdomsObject<String>
-
getCompressedData
- Specified by:
getCompressedDatain classKingdomsObject<String>
-
toString
-
toShortString
-
equals
-
isHigherThan
Checks whether this rank has higher priority than the given rank.- See Also:
-
isKing
public boolean isKing() -
getNode
-
setNode
-
canBePromoted
public boolean canBePromoted()Whether this rank can be promoted. The king rank and a rank below the king rank ("general" by default) cannot be "promoted" the general must simply be "set" as king. -
getMaterial
public @NonNull com.cryptomorin.xseries.XMaterial getMaterial() -
setMaterial
public void setMaterial(com.cryptomorin.xseries.XMaterial material) -
getName
-
setName
-
getColor
-
setColor
-
getSymbol
-
setSymbol
-
getMaxClaims
public int getMaxClaims() -
setMaxClaims
public void setMaxClaims(int maxClaims) -
getPriority
public @org.checkerframework.common.value.qual.IntRange(from=0L, to=2147483647L) int getPriority()Rank priorities start from zero. King has priority 0 This means that "less important" ranks have higher priority.- See Also:
-
setPriority
@Internal protected void setPriority(@org.checkerframework.common.value.qual.IntRange(from=0L, to=2147483647L) int priority) -
getPermissions
-
setPermissions
-