Changed the /region flag flags list to check permissions.

This commit is contained in:
sk89q 2011-04-02 18:00:48 -07:00
parent 64b12f8497
commit beb10e22f2

View File

@ -495,6 +495,23 @@ public static void flag(CommandContext args, WorldGuardPlugin plugin,
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());
}