forked from 2009Scape/Server
[ms] Fix -update command,
This commit is contained in:
parent
5007272dcb
commit
3e1f59c1c3
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue