From 933987ac0aca99c717e679ad0db7b24ee91420a7 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Thu, 24 Feb 2011 23:04:50 +0100 Subject: [PATCH] /tpr spawn does now need the permissions /tpregion.spawn and also added /region flag spawn delete --- .../sk89q/worldguard/bukkit/commands/CommandRegionFlag.java | 4 +++- src/com/sk89q/worldguard/bukkit/commands/CommandTpRegion.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/sk89q/worldguard/bukkit/commands/CommandRegionFlag.java b/src/com/sk89q/worldguard/bukkit/commands/CommandRegionFlag.java index 4137413d..5172d1b7 100644 --- a/src/com/sk89q/worldguard/bukkit/commands/CommandRegionFlag.java +++ b/src/com/sk89q/worldguard/bukkit/commands/CommandRegionFlag.java @@ -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 spawn "); } }else if(nameStr.equals("teleport")) { diff --git a/src/com/sk89q/worldguard/bukkit/commands/CommandTpRegion.java b/src/com/sk89q/worldguard/bukkit/commands/CommandTpRegion.java index 1a5e3860..93c29d10 100644 --- a/src/com/sk89q/worldguard/bukkit/commands/CommandTpRegion.java +++ b/src/com/sk89q/worldguard/bukkit/commands/CommandTpRegion.java @@ -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());