mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-05-07 08:11:47 +00:00
update gc for all worlds (thanks to Yofel)
This commit is contained in:
parent
9b39a227c9
commit
4ca09cea2d
1 changed files with 12 additions and 1 deletions
|
@ -38,8 +38,19 @@ public class Commandgc extends EssentialsCommand
|
||||||
|
|
||||||
for (World w : server.getWorlds())
|
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(
|
sender.sendMessage(
|
||||||
(w.getEnvironment() == World.Environment.NETHER ? "Nether" : "World") + " \"" + w.getName() + "\": "
|
worldType + " \"" + w.getName() + "\": "
|
||||||
+ w.getLoadedChunks().length + _("gcchunks")
|
+ w.getLoadedChunks().length + _("gcchunks")
|
||||||
+ w.getEntities().size() + _("gcentities"));
|
+ w.getEntities().size() + _("gcentities"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue