diff --git a/pandalib-players-permissible/src/main/java/fr/pandacube/lib/players/permissible/PermissibleOnlinePlayer.java b/pandalib-players-permissible/src/main/java/fr/pandacube/lib/players/permissible/PermissibleOnlinePlayer.java index 6385d7f..1fa879c 100644 --- a/pandalib-players-permissible/src/main/java/fr/pandacube/lib/players/permissible/PermissibleOnlinePlayer.java +++ b/pandalib-players-permissible/src/main/java/fr/pandacube/lib/players/permissible/PermissibleOnlinePlayer.java @@ -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); } diff --git a/pandalib-players/src/main/java/fr/pandacube/lib/players/standalone/AbstractOnlinePlayer.java b/pandalib-players/src/main/java/fr/pandacube/lib/players/standalone/AbstractOnlinePlayer.java index 62293fd..c06eb5e 100644 --- a/pandalib-players/src/main/java/fr/pandacube/lib/players/standalone/AbstractOnlinePlayer.java +++ b/pandalib-players/src/main/java/fr/pandacube/lib/players/standalone/AbstractOnlinePlayer.java @@ -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.