Fix no permissions applying when include-global is false, and better support per-server/per-world groups
This commit is contained in:
@@ -26,6 +26,7 @@ import me.lucko.luckperms.BungeePlayerCache;
|
||||
import me.lucko.luckperms.LPBungeePlugin;
|
||||
import me.lucko.luckperms.api.event.events.UserPermissionRefreshEvent;
|
||||
import me.lucko.luckperms.api.implementation.internal.UserLink;
|
||||
import me.lucko.luckperms.utils.Contexts;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -46,7 +47,7 @@ public class BungeeUser extends User {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshPermissions() {
|
||||
public synchronized void refreshPermissions() {
|
||||
ProxiedPlayer player = plugin.getProxy().getPlayer(plugin.getUuidCache().getExternalUUID(getUuid()));
|
||||
if (player == null) {
|
||||
return;
|
||||
@@ -61,11 +62,16 @@ public class BungeeUser extends User {
|
||||
|
||||
// Calculate the permissions that should be applied. This is done async.
|
||||
Map<String, Boolean> toApply = exportNodes(
|
||||
plugin.getConfiguration().getServer(),
|
||||
server,
|
||||
null,
|
||||
plugin.getConfiguration().getIncludeGlobalPerms(),
|
||||
true,
|
||||
new Contexts(
|
||||
plugin.getConfiguration().getServer(),
|
||||
server,
|
||||
null,
|
||||
plugin.getConfiguration().getIncludeGlobalPerms(),
|
||||
plugin.getConfiguration().getIncludeGlobalWorldPerms(),
|
||||
true,
|
||||
plugin.getConfiguration().getApplyGlobalGroups(),
|
||||
plugin.getConfiguration().getApplyGlobalWorldGroups()
|
||||
),
|
||||
Collections.emptyList()
|
||||
);
|
||||
|
||||
|
||||
@@ -8,9 +8,20 @@
|
||||
# The name of the server, used for server specific permissions. Set to 'global' to disable.
|
||||
server: bungee
|
||||
|
||||
# If users on this server should have their global permissions/groups applied.
|
||||
# If users on this server should have their global permissions applied.
|
||||
# If set to false, only server specific permissions will apply for users on this server
|
||||
include-global: false
|
||||
|
||||
# If users on this server should have their global world permissions applied.
|
||||
# If set to false, only world specific permissions will apply for users on this server
|
||||
include-global-world: true
|
||||
|
||||
# If users on this server should have global (non-server specific) groups applied
|
||||
apply-global-groups: true
|
||||
|
||||
# If users on this server should have global (non-world specific) groups applied
|
||||
apply-global-world-groups: true
|
||||
|
||||
# If this server is in offline or online mode.
|
||||
# This setting allows a player to have the same UUID across a network of offline mode/mixed servers.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user