Fixed addowner/addmember commands adding command artifacts.

Specifically, "-w <world>" will no longer be added when using it.
This requires WorldEdit with commit cd5f832 or newer.
Additionally fixed a typo: DefaultDomain.removaAll -> removeAll.
This commit is contained in:
wizjany 2013-08-03 09:24:42 -04:00
parent 4acef77623
commit 458cf64501
3 changed files with 8 additions and 8 deletions

View File

@ -71,7 +71,7 @@
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>worldedit</artifactId>
<version>5.5.3</version>
<version>5.5.8-SNAPSHOT</version>
<scope>compile</scope>
<type>jar</type>
</dependency>

View File

@ -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

View File

@ -136,7 +136,7 @@ public String toUserFriendlyString() {
return str.toString();
}
public void removaAll() {
public void removeAll() {
groups.clear();
players.clear();
}