mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 11:36:11 +01:00
Changed /region {add|rem}{member|owner} to allow putting owners/members on the global region.
This commit is contained in:
parent
564d4442fc
commit
82e04ac4e5
@ -49,10 +49,6 @@ public static void addMember(CommandContext args, WorldGuardPlugin plugin,
|
|||||||
LocalPlayer localPlayer = plugin.wrapPlayer(player);
|
LocalPlayer localPlayer = plugin.wrapPlayer(player);
|
||||||
|
|
||||||
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);
|
||||||
@ -94,10 +90,6 @@ public static void addOwner(CommandContext args, WorldGuardPlugin plugin,
|
|||||||
LocalPlayer localPlayer = plugin.wrapPlayer(player);
|
LocalPlayer localPlayer = plugin.wrapPlayer(player);
|
||||||
|
|
||||||
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);
|
||||||
@ -139,10 +131,6 @@ public static void removeMember(CommandContext args, WorldGuardPlugin plugin,
|
|||||||
LocalPlayer localPlayer = plugin.wrapPlayer(player);
|
LocalPlayer localPlayer = plugin.wrapPlayer(player);
|
||||||
|
|
||||||
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);
|
||||||
@ -184,10 +172,6 @@ public static void removeOwner(CommandContext args, WorldGuardPlugin plugin,
|
|||||||
LocalPlayer localPlayer = plugin.wrapPlayer(player);
|
LocalPlayer localPlayer = plugin.wrapPlayer(player);
|
||||||
|
|
||||||
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user