Move a couple more methods around in the API

This commit is contained in:
Luck
2017-11-08 15:48:55 +00:00
Unverified
parent 3e8f7911af
commit d75b29f51d
6 changed files with 33 additions and 69 deletions
@@ -25,8 +25,6 @@
package me.lucko.luckperms.api;
import me.lucko.luckperms.api.context.ContextSet;
import java.util.OptionalInt;
import javax.annotation.Nonnull;
@@ -44,28 +42,6 @@ public interface Group extends PermissionHolder {
@Nonnull
String getName();
/**
* Check to see if a group inherits another group directly
*
* @param group The group to check membership of
* @return true if the group inherits the other group
* @throws NullPointerException if the group is null
* @throws IllegalStateException if the group instance was not obtained from LuckPerms.
*/
boolean inheritsGroup(@Nonnull Group group);
/**
* Check to see if a group inherits another group directly
*
* @param group The group to check membership of
* @param contextSet the context set to filter by
* @return true if the group inherits the other group
* @throws NullPointerException if the group is null
* @throws IllegalStateException if the group instance was not obtained from LuckPerms.
* @since 3.2
*/
boolean inheritsGroup(@Nonnull Group group, @Nonnull ContextSet contextSet);
/**
* Gets the weight of this group, if present.
*
@@ -284,6 +284,29 @@ public interface PermissionHolder {
@Nonnull
Tristate inheritsPermission(@Nonnull Node node);
/**
* Check to see if this holder inherits another group directly
*
* @param group The group to check membership of
* @return true if the group inherits the other group
* @throws NullPointerException if the group is null
* @throws IllegalStateException if the group instance was not obtained from LuckPerms.
* @since 4.0
*/
boolean inheritsGroup(@Nonnull Group group);
/**
* Check to see if this holder inherits another group directly
*
* @param group The group to check membership of
* @param contextSet the context set to filter by
* @return true if the group inherits the other group
* @throws NullPointerException if the group is null
* @throws IllegalStateException if the group instance was not obtained from LuckPerms.
* @since 4.0
*/
boolean inheritsGroup(@Nonnull Group group, @Nonnull ContextSet contextSet);
/**
* Sets a permission for the object
*
@@ -26,7 +26,6 @@
package me.lucko.luckperms.api;
import me.lucko.luckperms.api.caching.UserData;
import me.lucko.luckperms.api.context.ContextSet;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
@@ -96,27 +95,6 @@ public interface User extends PermissionHolder {
@Nonnull
CompletableFuture<Void> refreshCachedData();
/**
* Check to see if the user is a direct member of a group
*
* @param group The group to check membership of
* @return true if the user is a member of the group
* @throws NullPointerException if the group is null
* @throws IllegalStateException if the group instance was not obtained from LuckPerms.
*/
boolean isInGroup(@Nonnull Group group);
/**
* Check to see if the user is a direct member of a group in a specific context
*
* @param group the group to check membership of
* @param contextSet the context set to filter by
* @return true if the user is a member of the group
* @throws IllegalStateException if the group instance was not obtained from LuckPerms.
* @since 3.2
*/
boolean isInGroup(@Nonnull Group group, @Nonnull ContextSet contextSet);
/**
* Refresh and re-assign the users permissions.
*