mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-24 18:19:03 +01:00
/tpr <id> spawn does now need the permissions /tpregion.spawn and also
added /region flag <id> spawn delete
This commit is contained in:
parent
3a10a0969a
commit
933987ac0a
@ -85,7 +85,7 @@ public boolean handle(CommandSender sender, String senderName, String command, S
|
||||
}else{
|
||||
player.sendMessage(ChatColor.RED + "You must set the spawn location inside the region it belongs to.");
|
||||
}
|
||||
} else {
|
||||
} else if (nameStr.equals("delete")){
|
||||
AreaFlags flags = region.getFlags();
|
||||
flags.setFlag("spawn", "x", (String)null);
|
||||
flags.setFlag("spawn", "y", (String)null);
|
||||
@ -94,6 +94,8 @@ public boolean handle(CommandSender sender, String senderName, String command, S
|
||||
flags.setFlag("spawn", "pitch", (String)null);
|
||||
flags.setFlag("spawn", "world", (String)null);
|
||||
player.sendMessage(ChatColor.YELLOW + "Region '" + id + "' updated. Flag spawn removed.");
|
||||
}else{
|
||||
player.sendMessage(ChatColor.RED + "Usage: /region flag <regionid> spawn <set|delete>");
|
||||
}
|
||||
}else if(nameStr.equals("teleport"))
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ public boolean handle(CommandSender sender, String senderName,
|
||||
String id = args[0];
|
||||
Boolean spawn = false;
|
||||
if(args.length==2 && args[1].equals("spawn")){
|
||||
ch.checkPermission(player, "spawn");
|
||||
ch.checkPermission(player, "/tpregion.spawn");
|
||||
spawn = true;
|
||||
}
|
||||
RegionManager mgr = wg.getGlobalRegionManager().getRegionManager(player.getWorld().getName());
|
||||
|
Loading…
Reference in New Issue
Block a user