[ms] Fix -update command,

This commit is contained in:
RedSparr0w 2019-09-23 16:38:18 +12:00
parent 5007272dcb
commit 3e1f59c1c3

View file

@ -64,10 +64,10 @@ public final class Main {
System.out.println("Player [name=" + name + ", world=" + player.getWorldId() + ", active=" + player.isActive() + "].");
}
},
new Command("-update", "Calls an update on all the game servers (-update -1 to cancel).") {
new Command("-update", "[ticks]? Calls an update on all the game servers (-update -1 to cancel).") {
@Override
public void run(String...args) {
int ticks = Integer.parseInt(args[1]);
int ticks = args.length > 1 ? Integer.parseInt(args[1]) : 500;
for (GameServer server : WorldDatabase.getWorlds()) {
if (server != null && server.isActive()) {
WorldPacketRepository.sendUpdate(server, ticks);