Changed /region {add|rem}{member|owner} to allow putting owners/members on the global region.

This commit is contained in:
sk89q 2011-06-27 11:23:33 -07:00
parent 564d4442fc
commit 82e04ac4e5

View File

@ -50,10 +50,6 @@ public static void addMember(CommandContext args, WorldGuardPlugin plugin,
String id = args.getString(0); String id = args.getString(0);
if (id.equalsIgnoreCase("__global__")) {
throw new CommandException("The region cannot be named __global__");
}
RegionManager mgr = plugin.getGlobalRegionManager().get(world); RegionManager mgr = plugin.getGlobalRegionManager().get(world);
ProtectedRegion region = mgr.getRegion(id); ProtectedRegion region = mgr.getRegion(id);
@ -95,10 +91,6 @@ public static void addOwner(CommandContext args, WorldGuardPlugin plugin,
String id = args.getString(0); String id = args.getString(0);
if (id.equalsIgnoreCase("__global__")) {
throw new CommandException("The region cannot be named __global__");
}
RegionManager mgr = plugin.getGlobalRegionManager().get(world); RegionManager mgr = plugin.getGlobalRegionManager().get(world);
ProtectedRegion region = mgr.getRegion(id); ProtectedRegion region = mgr.getRegion(id);
@ -140,10 +132,6 @@ public static void removeMember(CommandContext args, WorldGuardPlugin plugin,
String id = args.getString(0); String id = args.getString(0);
if (id.equalsIgnoreCase("__global__")) {
throw new CommandException("The region cannot be named __global__");
}
RegionManager mgr = plugin.getGlobalRegionManager().get(world); RegionManager mgr = plugin.getGlobalRegionManager().get(world);
ProtectedRegion region = mgr.getRegion(id); ProtectedRegion region = mgr.getRegion(id);
@ -185,10 +173,6 @@ public static void removeOwner(CommandContext args, WorldGuardPlugin plugin,
String id = args.getString(0); String id = args.getString(0);
if (id.equalsIgnoreCase("__global__")) {
throw new CommandException("The region cannot be named __global__");
}
RegionManager mgr = plugin.getGlobalRegionManager().get(world); RegionManager mgr = plugin.getGlobalRegionManager().get(world);
ProtectedRegion region = mgr.getRegion(id); ProtectedRegion region = mgr.getRegion(id);