update gc for all worlds (thanks to Yofel)

This commit is contained in:
Iaccidentally 2012-08-06 06:54:55 -04:00
parent 9b39a227c9
commit 4ca09cea2d

View File

@ -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"));
}