Package me.lucko.luckperms.common.model
Class Track
java.lang.Object
me.lucko.luckperms.common.model.Track
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.luckperms.api.model.data.DataMutateResultappendGroup(Group group) Appends a group to the end of this trackvoidClear all of the groups within this trackbooleancontainsGroup(String group) Checks if a group features on this trackbooleancontainsGroup(Group group) Checks if a group features on this tracknet.luckperms.api.track.DemotionResultdemote(User user, net.luckperms.api.context.ContextSet context, Predicate<String> previousGroupPermissionChecker, @Nullable Sender sender, boolean removeFromFirst) booleanGets an ordered list of the groups on this trackgetName()Gets the next group on the track, after the one providedGets the next group on the track, after the one providedgetPrevious(String current) Gets the group before the group providedgetPrevious(Group current) Gets the group before the group providedintgetSize()Gets the number of groups on this trackinthashCode()net.luckperms.api.model.data.DataMutateResultinsertGroup(Group group, int position) Inserts a group at a certain position on this tracknet.luckperms.api.track.PromotionResultpromote(User user, net.luckperms.api.context.ContextSet context, Predicate<String> nextGroupPermissionChecker, @Nullable Sender sender, boolean addToFirst) net.luckperms.api.model.data.DataMutateResultremoveGroup(String group) Removes a group from this tracknet.luckperms.api.model.data.DataMutateResultremoveGroup(Group group) Removes a group from this trackvoidtoString()
-
Constructor Details
-
Track
-
-
Method Details
-
getName
-
getApiProxy
-
getGroups
Gets an ordered list of the groups on this track- Returns:
- am ordered
Listof the groups on this track
-
setGroups
-
getSize
public int getSize()Gets the number of groups on this track- Returns:
- the number of groups on this track
-
getNext
Gets the next group on the track, after the one provided- Parameters:
current- the group before the group being requested- Returns:
- the group name, or null if the end of the track has been reached
- Throws:
IllegalArgumentException- if the track does not contain the group given
-
getPrevious
Gets the group before the group provided- Parameters:
current- the group after the group being requested- Returns:
- the group name, or null if the start of the track has been reached
- Throws:
IllegalArgumentException- if the track does not contain the group given
-
getNext
Gets the next group on the track, after the one provided- Parameters:
current- the group before the group being requested- Returns:
- the group name, or null if the end of the track has been reached
- Throws:
IllegalArgumentException- if the track does not contain the group given
-
getPrevious
Gets the group before the group provided- Parameters:
current- the group after the group being requested- Returns:
- the group name, or null if the start of the track has been reached
- Throws:
IllegalArgumentException- if the track does not contain the group given
-
appendGroup
Appends a group to the end of this track- Parameters:
group- the group to append- Returns:
- the result of the operation
-
insertGroup
public net.luckperms.api.model.data.DataMutateResult insertGroup(Group group, int position) throws IndexOutOfBoundsException Inserts a group at a certain position on this track- Parameters:
group- the group to be insertedposition- the index position (a value of 0 inserts at the start)- Returns:
- the result of the operation
- Throws:
IndexOutOfBoundsException- if the position is less than 0 or greater than the size of the track
-
removeGroup
Removes a group from this track- Parameters:
group- the group to remove- Returns:
- the result of the operation
-
removeGroup
Removes a group from this track- Parameters:
group- the group to remove- Returns:
- the result of the operation
-
containsGroup
Checks if a group features on this track- Parameters:
group- the group to check- Returns:
- true if the group is on this track
-
containsGroup
Checks if a group features on this track- Parameters:
group- the group to check- Returns:
- true if the group is on this track
-
clearGroups
public void clearGroups()Clear all of the groups within this track -
promote
-
demote
-
equals
-
hashCode
public int hashCode() -
toString
-