Quick fixes to the purge command.

This commit is contained in:
Rigby 2011-03-18 00:55:58 +00:00
parent 6de723705f
commit bd589a6b9a
2 changed files with 11 additions and 4 deletions

View File

@ -19,13 +19,21 @@ public class MVPurge extends MVCommandHandler {
@Override
public boolean perform(CommandSender sender, String[] args) {
if(!(args.length>0)){
return false;
}
if(!(sender instanceof Player)){
sender.sendMessage("This command needs to be used from inside the game!");
return true;
}
}
Player p = (Player) sender;
List<String> creatures = new ArrayList<String>();
creatures.add(args[0].toUpperCase());
for(String creature : args[0].toUpperCase().split(",")){
creatures.add(creature);
}
new PurgeWorlds(plugin).purge(sender, p.getWorld(), creatures);

View File

@ -65,5 +65,4 @@ commands:
/<command> [world] [creatures]
/<command> -- Purges the players world of all creatures.
/<command> creative * -- Purges the creative world of all Creatures.
/<command> creative creeper -- Purges the creative world of all CREEPERS.
/<command> creative creeper -- Purges the creative world of all CREEPERS.