mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2025-01-12 12:25:03 +08:00
Check both superperms and PEX directly to support older versions of PEX with inGroup
Older versions didn't set the group nodes correctly, so they were only accessible through getEffectivePermissions()
This commit is contained in:
parent
a65b574d9d
commit
4daef4aff2
@ -22,7 +22,6 @@
|
||||
import com.sk89q.util.yaml.YAMLProcessor;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.permissions.Permissible;
|
||||
import ru.tehkode.permissions.PermissionManager;
|
||||
import ru.tehkode.permissions.PermissionUser;
|
||||
@ -67,11 +66,7 @@ public boolean hasPermission(String worldName, OfflinePlayer player, String perm
|
||||
}
|
||||
|
||||
public boolean inGroup(OfflinePlayer player, String group) {
|
||||
if (getPermissible(player) == null) {
|
||||
return manager.getUser(player.getName()).inGroup(group);
|
||||
} else {
|
||||
return hasPermission(player, GROUP_PREFIX + group);
|
||||
}
|
||||
return super.inGroup(player, group) || manager.getUser(player.getName()).inGroup(group);
|
||||
}
|
||||
|
||||
public String[] getGroups(OfflinePlayer player) {
|
||||
|
Loading…
Reference in New Issue
Block a user