diff options
author | Luck <git@lucko.me> | 2018-12-19 14:07:01 +0000 |
---|---|---|
committer | Luck <git@lucko.me> | 2018-12-19 14:07:01 +0000 |
commit | 66a8afab99efb7ac7669961eb2e67e2244d494e5 (patch) | |
tree | 7930ab1768da5df81799995472292d73d6ce2647 /spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java | |
parent | db6ac9b36ae0242c53dc1452ac8fbc6cd7b748c2 (diff) | |
download | spark-66a8afab99efb7ac7669961eb2e67e2244d494e5.tar.gz spark-66a8afab99efb7ac7669961eb2e67e2244d494e5.tar.bz2 spark-66a8afab99efb7ac7669961eb2e67e2244d494e5.zip |
Count current tick using an int instead of LongAdder
Assuming 20tps, there's enough space in an int to store a tick count spanning a number of years :)
Diffstat (limited to 'spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java')
-rw-r--r-- | spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java b/spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java index aa42efd..01052cb 100644 --- a/spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java +++ b/spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java @@ -116,7 +116,7 @@ public class SparkSpongePlugin implements CommandCallable { @Override public void runAsync(Runnable r) { - asyncExecutor.execute(r); + SparkSpongePlugin.this.asyncExecutor.execute(r); } @Override @@ -139,7 +139,7 @@ public class SparkSpongePlugin implements CommandCallable { @Listener public void onServerStart(GameStartedServerEvent event) { - game.getCommandManager().register(this, this, "spark"); + this.game.getCommandManager().register(this, this, "spark"); } @Override @@ -149,7 +149,7 @@ public class SparkSpongePlugin implements CommandCallable { return CommandResult.empty(); } - sparkPlatform.executeCommand(source, arguments.split(" ")); + this.sparkPlatform.executeCommand(source, arguments.split(" ")); return CommandResult.empty(); } |