From 458cf64501c763133790b198d2874f705c38a940 Mon Sep 17 00:00:00 2001 From: wizjany Date: Sat, 3 Aug 2013 09:24:42 -0400 Subject: [PATCH] Fixed addowner/addmember commands adding command artifacts. Specifically, "-w " will no longer be added when using it. This requires WorldEdit with commit cd5f832 or newer. Additionally fixed a typo: DefaultDomain.removaAll -> removeAll. --- pom.xml | 2 +- .../bukkit/commands/RegionMemberCommands.java | 12 ++++++------ .../com/sk89q/worldguard/domains/DefaultDomain.java | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 6fe932c5..db0e57b3 100644 --- a/pom.xml +++ b/pom.xml @@ -71,7 +71,7 @@ com.sk89q worldedit - 5.5.3 + 5.5.8-SNAPSHOT compile jar diff --git a/src/main/java/com/sk89q/worldguard/bukkit/commands/RegionMemberCommands.java b/src/main/java/com/sk89q/worldguard/bukkit/commands/RegionMemberCommands.java index e77b0ddc..01086b87 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/commands/RegionMemberCommands.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/commands/RegionMemberCommands.java @@ -89,7 +89,7 @@ public void addMember(CommandContext args, CommandSender sender) throws CommandE } } - RegionDBUtil.addToDomain(region.getMembers(), args.getPaddedSlice(2, 0), 0); + RegionDBUtil.addToDomain(region.getMembers(), args.getParsedPaddedSlice(1, 0), 0); sender.sendMessage(ChatColor.YELLOW + "Region '" + id + "' updated."); @@ -159,7 +159,7 @@ public void addOwner(CommandContext args, CommandSender sender) throws CommandEx } } - RegionDBUtil.addToDomain(region.getOwners(), args.getPaddedSlice(2, 0), 0); + RegionDBUtil.addToDomain(region.getOwners(), args.getParsedPaddedSlice(1, 0), 0); sender.sendMessage(ChatColor.YELLOW + "Region '" + id + "' updated."); @@ -217,12 +217,12 @@ public void removeMember(CommandContext args, CommandSender sender) throws Comma } if (args.hasFlag('a')) { - region.getMembers().removaAll(); + region.getMembers().removeAll(); } else { if (args.argsLength() < 2) { throw new CommandException("List some names to remove, or use -a to remove all."); } - RegionDBUtil.removeFromDomain(region.getMembers(), args.getPaddedSlice(2, 0), 0); + RegionDBUtil.removeFromDomain(region.getMembers(), args.getParsedPaddedSlice(1, 0), 0); } sender.sendMessage(ChatColor.YELLOW @@ -282,12 +282,12 @@ public void removeOwner(CommandContext args, } if (args.hasFlag('a')) { - region.getOwners().removaAll(); + region.getOwners().removeAll(); } else { if (args.argsLength() < 2) { throw new CommandException("List some names to remove, or use -a to remove all."); } - RegionDBUtil.removeFromDomain(region.getOwners(), args.getPaddedSlice(2, 0), 0); + RegionDBUtil.removeFromDomain(region.getOwners(), args.getParsedPaddedSlice(1, 0), 0); } sender.sendMessage(ChatColor.YELLOW diff --git a/src/main/java/com/sk89q/worldguard/domains/DefaultDomain.java b/src/main/java/com/sk89q/worldguard/domains/DefaultDomain.java index 6312390d..60653c61 100644 --- a/src/main/java/com/sk89q/worldguard/domains/DefaultDomain.java +++ b/src/main/java/com/sk89q/worldguard/domains/DefaultDomain.java @@ -136,7 +136,7 @@ public String toUserFriendlyString() { return str.toString(); } - public void removaAll() { + public void removeAll() { groups.clear(); players.clear(); }