Added getServerPermissionName() for OnlinePlayer
This commit is contained in:
parent
f0a9fca952
commit
61fb7b3142
@ -67,7 +67,7 @@ public interface PermissibleOnlinePlayer extends PermissibleOffPlayer, AbstractO
|
||||
* @return a LongStream containing all the values found for the specified permission prefix.
|
||||
*/
|
||||
default LongStream getPermissionRangeValues(String permissionPrefix) {
|
||||
String server = getServerName();
|
||||
String server = getServerPermissionName();
|
||||
String world = server == null ? null : getWorldName();
|
||||
return getPermissionUser().getPermissionRangeValues(permissionPrefix, server, world);
|
||||
}
|
||||
@ -76,7 +76,7 @@ public interface PermissibleOnlinePlayer extends PermissibleOffPlayer, AbstractO
|
||||
* Returns the maximum value returned by {@link PermissibleOffPlayer#getPermissionRangeValues(String)}.
|
||||
*/
|
||||
default OptionalLong getPermissionRangeMax(String permissionPrefix) {
|
||||
String server = getServerName();
|
||||
String server = getServerPermissionName();
|
||||
String world = server == null ? null : getWorldName();
|
||||
return getPermissionUser().getPermissionRangeMax(permissionPrefix, server, world);
|
||||
}
|
||||
|
@ -23,11 +23,19 @@ public interface AbstractOnlinePlayer extends AbstractOffPlayer {
|
||||
|
||||
/**
|
||||
* Returns the name of the current server the player is in.
|
||||
* The returned value is used by the 'pandalib-permissions' system.
|
||||
* @return the name of the current server the player is in.
|
||||
*/
|
||||
String getServerName();
|
||||
|
||||
/**
|
||||
* Returns the name of the current server as used by the permission system.
|
||||
* The returned value is used by the 'pandalib-permissions' system.
|
||||
* @return the permission name of the current server.
|
||||
*/
|
||||
default String getServerPermissionName() {
|
||||
return getServerName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the current world the player is in.
|
||||
* The returned value is used by the 'pandalib-permissions' system.
|
||||
|
Loading…
Reference in New Issue
Block a user