mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 11:36:11 +01:00
Changed the /region flag flags list to check permissions.
This commit is contained in:
parent
64b12f8497
commit
beb10e22f2
@ -494,6 +494,23 @@ public static void flag(CommandContext args, WorldGuardPlugin plugin,
|
||||
if (list.length() > 0) {
|
||||
list.append(", ");
|
||||
}
|
||||
|
||||
if (region.isOwner(localPlayer)) {
|
||||
if (!plugin.hasPermission(sender, "worldguard.region.flag.flags."
|
||||
+ flag.getName() + ".owner." + id.toLowerCase())) {
|
||||
continue;
|
||||
}
|
||||
} else if (region.isMember(localPlayer)) {
|
||||
if (!plugin.hasPermission(sender, "worldguard.region.flag.flags."
|
||||
+ flag.getName() + ".member." + id.toLowerCase())) {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (!plugin.hasPermission(sender, "worldguard.region.flag.flags."
|
||||
+ flag.getName() + "." + id.toLowerCase())) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
list.append(flag.getName());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user