Interface EnumRankNode<E extends Enum<E>>
- All Superinterfaces:
RankNode
Represents a rank backed by an enum.
-
Field Summary
Fields inherited from interface com.xpdustry.distributor.api.permission.rank.RankNode
NAME_PATTERN -
Method Summary
Modifier and TypeMethodDescription@Nullable EnumRankNode<E>Returns the previous rank node in the hierarchy.getValue()Returns the enum value of this rank node.Creates aEnumRankNodewith a linear hierarchy.Creates aEnumRankNodewith no hierarchy.
-
Method Details
-
linear
Creates aEnumRankNodewith a linear hierarchy. This means the rank nodes are ordered by the enum ordinal. It can be either:- ascending, where the lower ordinal is the lower rank
- descending, where the higher ordinal is the lower rank
- Type Parameters:
E- the enum type- Parameters:
value- the rank valuenamespace- the rank namespaceascending- whether the enum ranks are in ascending order- Returns:
- the created enum rank node
-
singular
Creates aEnumRankNodewith no hierarchy. This means each rank node is independent of each other. Ideal for achievements based permissions.- Type Parameters:
E- the enum type- Parameters:
value- the rank valuenamespace- the rank namespace- Returns:
- the created enum rank node
-
getValue
E getValue()Returns the enum value of this rank node. -
getPrevious
@Nullable EnumRankNode<E> getPrevious()Description copied from interface:RankNodeReturns the previous rank node in the hierarchy.- Specified by:
getPreviousin interfaceRankNode
-