public interface Track
Groups.| Modifier and Type | Method and Description |
|---|---|
DataMutateResult |
appendGroup(Group group)
Appends a group to the end of this track
|
void |
clearGroups()
Clear all of the groups from this track
|
boolean |
containsGroup(Group group)
Checks if a group features on this track
|
boolean |
containsGroup(String group)
Checks if a group features on this track
|
DemotionResult |
demote(User user,
ContextSet contextSet)
Demotes the given user along this track.
|
List<String> |
getGroups()
Gets a list of the groups on this track
|
String |
getName()
Gets the name of this track
|
String |
getNext(Group current)
Gets the next group on the track, after the one provided
|
String |
getPrevious(Group current)
Gets the previous group on the track, before the one provided
|
int |
getSize()
Gets the number of groups on this track
|
DataMutateResult |
insertGroup(Group group,
int position)
Inserts a group at a certain position on this track
|
PromotionResult |
promote(User user,
ContextSet contextSet)
Promotes the given user along this track.
|
DataMutateResult |
removeGroup(Group group)
Removes a group from this track
|
DataMutateResult |
removeGroup(String group)
Removes a group from this track
|
@Nonnull List<String> getGroups()
Index 0 is the first/lowest group in (or start of) the track.
The returned collection is immutable, and cannot be modified.
List of the groups on this trackint getSize()
@Nullable String getNext(@Nonnull Group current)
null is returned if the group is not on the track.
current - the group before the group being requestedNullPointerException - if the group is nullIllegalStateException - if the group instance was not obtained from LuckPerms.@Nullable String getPrevious(@Nonnull Group current)
null is returned if the group is not on the track.
current - the group after the group being requestedNullPointerException - if the group is nullIllegalStateException - if the group instance was not obtained from LuckPerms.@Nonnull PromotionResult promote(@Nonnull User user, @Nonnull ContextSet contextSet)
user - the user to promotecontextSet - the contexts to promote the user in@Nonnull DemotionResult demote(@Nonnull User user, @Nonnull ContextSet contextSet)
user - the user to demotecontextSet - the contexts to demote the user in@Nonnull DataMutateResult appendGroup(@Nonnull Group group)
group - the group to appendNullPointerException - if the group is nullIllegalStateException - if the group instance was not obtained from LuckPerms.@Nonnull DataMutateResult insertGroup(@Nonnull Group group, int position) throws IndexOutOfBoundsException
group - the group to be insertedposition - the index position (a value of 0 inserts at the start)IndexOutOfBoundsException - if the position is less than 0 or greater than the size of the trackNullPointerException - if the group is nullIllegalStateException - if the group instance was not obtained from LuckPerms.@Nonnull DataMutateResult removeGroup(@Nonnull Group group)
group - the group to removeNullPointerException - if the group is nullIllegalStateException - if the group instance was not obtained from LuckPerms.@Nonnull DataMutateResult removeGroup(@Nonnull String group)
group - the group to removeNullPointerException - if the group is nullboolean containsGroup(@Nonnull Group group)
group - the group to checkNullPointerException - if the group is nullIllegalStateException - if the group instance was not obtained from LuckPerms.boolean containsGroup(@Nonnull String group)
group - the group to checkNullPointerException - if the group is nullvoid clearGroups()
Copyright © 2018. All rights reserved.