mirror of
https://github.com/Phoenix616/RandomTeleport.git
synced 2025-02-19 22:11:49 +01:00
Fix -biome option not working when another option was passed behind it
This commit is contained in:
parent
ce33cd01ae
commit
b1e108c444
@ -246,6 +246,9 @@ public class RandomTeleport extends JavaPlugin implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
for(i = i+1; i < args.length; i++) {
|
||||
if(args[i].startsWith("-")) {
|
||||
break;
|
||||
}
|
||||
try {
|
||||
biomeList.add(Biome.valueOf(args[i].toUpperCase()));
|
||||
} catch(IllegalArgumentException e) {
|
||||
@ -253,6 +256,10 @@ public class RandomTeleport extends JavaPlugin implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(biomeList.size() == 0) {
|
||||
sender.sendMessage(ChatColor.DARK_RED + "Error:" + ChatColor.RED + " Please specify at least one biome after the -biome option!");
|
||||
return true;
|
||||
}
|
||||
|
||||
// if -x/-z option is selected set x/z it to its values
|
||||
} else if(args[i].equalsIgnoreCase("-x") || args[i].equalsIgnoreCase("-xPos")) {
|
||||
|
Loading…
Reference in New Issue
Block a user