mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-22 18:47:20 +01:00
Quick fixes to the purge command.
This commit is contained in:
parent
6de723705f
commit
bd589a6b9a
@ -19,13 +19,21 @@ public class MVPurge extends MVCommandHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean perform(CommandSender sender, String[] args) {
|
public boolean perform(CommandSender sender, String[] args) {
|
||||||
|
if(!(args.length>0)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if(!(sender instanceof Player)){
|
if(!(sender instanceof Player)){
|
||||||
sender.sendMessage("This command needs to be used from inside the game!");
|
sender.sendMessage("This command needs to be used from inside the game!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player p = (Player) sender;
|
Player p = (Player) sender;
|
||||||
List<String> creatures = new ArrayList<String>();
|
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);
|
new PurgeWorlds(plugin).purge(sender, p.getWorld(), creatures);
|
||||||
|
|
||||||
|
@ -65,5 +65,4 @@ commands:
|
|||||||
/<command> [world] [creatures]
|
/<command> [world] [creatures]
|
||||||
/<command> -- Purges the players world of all creatures.
|
/<command> -- Purges the players world of all creatures.
|
||||||
/<command> creative * -- Purges the creative 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.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user