Uniformization of how permission check is handled between pandalib-(.*-)players, Paper/Bungee and pandalib-permissions.

When an *OnlinePlayer class ask for permission, it always ask for Paper/Bungee API. The pandalib-permissions system will be called by Paper/Bungee only if it used and integrated into Paper/Bungee using the appropriate modules.
This commit reduces inter-dependencies between pandalib-(.*-)permissions modules and pandalib-(.*-)players (except pandalib-players-permissible that has to depends on pandalib-permissions)
This commit is contained in:
2022-08-08 03:16:00 +02:00
parent a885c224a6
commit f976350ee1
14 changed files with 95 additions and 40 deletions

View File

@@ -63,6 +63,21 @@ public interface BungeeOnlinePlayer extends BungeeOffPlayer, StandaloneOnlinePla
/*
* Permissions and groups
*/
/**
* Tells if this online player has the specified permission.
*/
default boolean hasPermission(String permission) {
return getBungeeProxiedPlayer().hasPermission(permission);
}
/*
* Sending packet and stuff to player