diff options
author | gravypod <gravypod@gravypod.com> | 2012-12-29 20:23:35 -0500 |
---|---|---|
committer | gravypod <gravypod@gravypod.com> | 2012-12-29 20:23:35 -0500 |
commit | 7c9c79a9ed32350b4b95086acdd99a387f3e46e5 (patch) | |
tree | 9b7e3954e94a40b9a2f40869a445a1d22610ccda | |
parent | 2c1414e7067070f9e3ff5a9d1c3b93572230c1d7 (diff) | |
download | Essentials-7c9c79a9ed32350b4b95086acdd99a387f3e46e5.tar Essentials-7c9c79a9ed32350b4b95086acdd99a387f3e46e5.tar.gz Essentials-7c9c79a9ed32350b4b95086acdd99a387f3e46e5.tar.lz Essentials-7c9c79a9ed32350b4b95086acdd99a387f3e46e5.tar.xz Essentials-7c9c79a9ed32350b4b95086acdd99a387f3e46e5.zip |
Less objects and moar finals
-rw-r--r-- | Essentials/src/net/ess3/commands/Commandgc.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Essentials/src/net/ess3/commands/Commandgc.java b/Essentials/src/net/ess3/commands/Commandgc.java index 70da888dc..2ffec2802 100644 --- a/Essentials/src/net/ess3/commands/Commandgc.java +++ b/Essentials/src/net/ess3/commands/Commandgc.java @@ -13,7 +13,7 @@ public class Commandgc extends EssentialsCommand @Override protected void run(final CommandSender sender, final String commandLabel, final String[] args) throws Exception { - float tps = ess.getTimer().getAverageTPS(); + final float tps = ess.getTimer().getAverageTPS(); ChatColor color; if (tps >= 18) { @@ -27,11 +27,12 @@ public class Commandgc extends EssentialsCommand { color = ChatColor.RED; } + final Runtime runTime = Runtime.getRuntime(); sender.sendMessage(_("uptime", DateUtil.formatDateDiff(ManagementFactory.getRuntimeMXBean().getStartTime()))); sender.sendMessage(_("tps", "" + color + tps)); - sender.sendMessage(_("gcmax", (Runtime.getRuntime().maxMemory() / 1024 / 1024))); - sender.sendMessage(_("gctotal", (Runtime.getRuntime().totalMemory() / 1024 / 1024))); - sender.sendMessage(_("gcfree", (Runtime.getRuntime().freeMemory() / 1024 / 1024))); + sender.sendMessage(_("gcmax", (runTime.maxMemory() / 1024 / 1024))); + sender.sendMessage(_("gctotal", (runTime.totalMemory() / 1024 / 1024))); + sender.sendMessage(_("gcfree", (runTime.freeMemory() / 1024 / 1024))); sender.sendMessage(_("gcquene", (ess.getStorageQueue().getQueueSize()))); for (World w : server.getWorlds()) |