From 034b83223c22a59d5a569f91dc8b4566d0d9e68e Mon Sep 17 00:00:00 2001 From: Iaccidentally Date: Mon, 6 Aug 2012 06:54:55 -0400 Subject: [PATCH] update gc for all worlds (thanks to Yofel) --- .../com/earth2me/essentials/commands/Commandgc.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgc.java b/Essentials/src/com/earth2me/essentials/commands/Commandgc.java index d9b08b50f..c8d5b732e 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandgc.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandgc.java @@ -38,8 +38,19 @@ public class Commandgc extends EssentialsCommand for (World w : server.getWorlds()) { + String worldType = "World"; + switch (w.getEnvironment()) + { + case NETHER: + worldType = "Nether"; + break; + case THE_END: + worldType = "The End"; + break; + } + sender.sendMessage( - (w.getEnvironment() == World.Environment.NETHER ? "Nether" : "World") + " \"" + w.getName() + "\": " + worldType + " \"" + w.getName() + "\": " + w.getLoadedChunks().length + _("gcchunks") + w.getEntities().size() + _("gcentities")); }