summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-01-20 20:35:41 +0000
committerKHobbits <rob@khobbits.co.uk>2013-01-20 20:35:41 +0000
commit63ce4a99b9175daa95212f20e9c0b54da19db86e (patch)
treefe7e74f8a9b32a62255b39b88308ffe7723de8cd
parent1ccda52e9f76805ef79195ab9069615a20e05b25 (diff)
downloadEssentials-63ce4a99b9175daa95212f20e9c0b54da19db86e.tar
Essentials-63ce4a99b9175daa95212f20e9c0b54da19db86e.tar.gz
Essentials-63ce4a99b9175daa95212f20e9c0b54da19db86e.tar.lz
Essentials-63ce4a99b9175daa95212f20e9c0b54da19db86e.tar.xz
Essentials-63ce4a99b9175daa95212f20e9c0b54da19db86e.zip
Trim long /gc output, add /gc all
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandgc.java37
-rw-r--r--Essentials/src/messages.properties1
-rw-r--r--Essentials/src/messages_cs.properties1
-rw-r--r--Essentials/src/messages_da.properties1
-rw-r--r--Essentials/src/messages_de.properties1
-rw-r--r--Essentials/src/messages_en.properties3
-rw-r--r--Essentials/src/messages_es.properties1
-rw-r--r--Essentials/src/messages_fi.properties1
-rw-r--r--Essentials/src/messages_fr.properties1
-rw-r--r--Essentials/src/messages_it.properties1
-rw-r--r--Essentials/src/messages_nl.properties1
-rw-r--r--Essentials/src/messages_pl.properties1
-rw-r--r--Essentials/src/messages_pt.properties1
-rw-r--r--Essentials/src/messages_se.properties1
-rw-r--r--Essentials/src/plugin.yml2
15 files changed, 38 insertions, 16 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgc.java b/Essentials/src/com/earth2me/essentials/commands/Commandgc.java
index 56816d452..3595603ce 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandgc.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandgc.java
@@ -3,6 +3,7 @@ package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Util;
import java.lang.management.ManagementFactory;
+import java.util.List;
import org.bukkit.ChatColor;
import org.bukkit.Server;
import org.bukkit.World;
@@ -33,28 +34,36 @@ public class Commandgc extends EssentialsCommand
{
color = ChatColor.RED;
}
-
+
sender.sendMessage(_("uptime", Util.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(_("gcfree", (Runtime.getRuntime().freeMemory() / 1024 / 1024)));
- for (World w : server.getWorlds())
+ List<World> worlds = server.getWorlds();
+ if (worlds.size() > 3 && args.length == 0)
+ {
+ sender.sendMessage(_("messageTruncated", commandLabel, "all"));
+ }
+ else
{
- String worldType = "World";
- switch (w.getEnvironment())
+ for (World w : worlds)
{
- case NETHER:
- worldType = "Nether";
- break;
- case THE_END:
- worldType = "The End";
- break;
- }
+ String worldType = "World";
+ switch (w.getEnvironment())
+ {
+ case NETHER:
+ worldType = "Nether";
+ break;
+ case THE_END:
+ worldType = "The End";
+ break;
+ }
- sender.sendMessage(_("gcWorld", worldType, w.getName(), w.getLoadedChunks().length, w.getEntities().size()));
+ sender.sendMessage(_("gcWorld", worldType, w.getName(), w.getLoadedChunks().length, w.getEntities().size()));
+ }
}
-
+
}
}
diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties
index d98ecb33b..359e93982 100644
--- a/Essentials/src/messages.properties
+++ b/Essentials/src/messages.properties
@@ -492,3 +492,4 @@ invalidFireworkFormat=\u00a76The option \u00a74{0} \u00a76is not a valid value f
muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76for all online players
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76for all players
+messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties
index ed1bb5f31..e6645a3b0 100644
--- a/Essentials/src/messages_cs.properties
+++ b/Essentials/src/messages_cs.properties
@@ -495,3 +495,4 @@ invalidFireworkFormat=\u00a76The option \u00a74{0} \u00a76is not a valid value f
muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
+messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties
index 3f8de42a5..f6f37e189 100644
--- a/Essentials/src/messages_da.properties
+++ b/Essentials/src/messages_da.properties
@@ -492,3 +492,4 @@ invalidFireworkFormat=\u00a76The option \u00a74{0} \u00a76is not a valid value f
muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
+messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties
index 5b3ce2162..f23e19a57 100644
--- a/Essentials/src/messages_de.properties
+++ b/Essentials/src/messages_de.properties
@@ -492,3 +492,4 @@ invalidFireworkFormat=\u00a76The option \u00a74{0} \u00a76is not a valid value f
muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
+messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties
index 9e5e2d8b2..359e93982 100644
--- a/Essentials/src/messages_en.properties
+++ b/Essentials/src/messages_en.properties
@@ -491,4 +491,5 @@ holdFirework=\u00a74You must be holding a firework to add effects
invalidFireworkFormat=\u00a76The option \u00a74{0} \u00a76is not a valid value for \u00a74{1}
muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76for all online players
-resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76for all players \ No newline at end of file
+resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76for all players
+messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties
index cb60230e9..e61d41ffb 100644
--- a/Essentials/src/messages_es.properties
+++ b/Essentials/src/messages_es.properties
@@ -492,3 +492,4 @@ invalidFireworkFormat=\u00a76The option \u00a74{0} \u00a76is not a valid value f
muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
+messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
diff --git a/Essentials/src/messages_fi.properties b/Essentials/src/messages_fi.properties
index 7f465142c..37021b744 100644
--- a/Essentials/src/messages_fi.properties
+++ b/Essentials/src/messages_fi.properties
@@ -492,3 +492,4 @@ invalidFireworkFormat=\u00a76The option \u00a74{0} \u00a76is not a valid value f
muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
+messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties
index d664d7d15..eb9bd09bc 100644
--- a/Essentials/src/messages_fr.properties
+++ b/Essentials/src/messages_fr.properties
@@ -492,3 +492,4 @@ invalidFireworkFormat=\u00a76The option \u00a74{0} \u00a76is not a valid value f
muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
+messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties
index 4bc2e2a29..496260802 100644
--- a/Essentials/src/messages_it.properties
+++ b/Essentials/src/messages_it.properties
@@ -492,3 +492,4 @@ invalidFireworkFormat=\u00a76The option \u00a74{0} \u00a76is not a valid value f
muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
+messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties
index 49bb56721..0df6ca70e 100644
--- a/Essentials/src/messages_nl.properties
+++ b/Essentials/src/messages_nl.properties
@@ -492,3 +492,4 @@ invalidFireworkFormat=\u00a76The option \u00a74{0} \u00a76is not a valid value f
muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
+messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties
index 75c5f4d72..825eb35d6 100644
--- a/Essentials/src/messages_pl.properties
+++ b/Essentials/src/messages_pl.properties
@@ -492,3 +492,4 @@ invalidFireworkFormat=\u00a76The option \u00a74{0} \u00a76is not a valid value f
muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
+messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties
index b3073ed62..69a8d2301 100644
--- a/Essentials/src/messages_pt.properties
+++ b/Essentials/src/messages_pt.properties
@@ -492,3 +492,4 @@ invalidFireworkFormat=\u00a76The option \u00a74{0} \u00a76is not a valid value f
muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
+messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
diff --git a/Essentials/src/messages_se.properties b/Essentials/src/messages_se.properties
index cc33a1ea3..0ddb94081 100644
--- a/Essentials/src/messages_se.properties
+++ b/Essentials/src/messages_se.properties
@@ -492,3 +492,4 @@ invalidFireworkFormat=\u00a76The option \u00a74{0} \u00a76is not a valid value f
muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
+messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml
index 0c4090918..753c9a41e 100644
--- a/Essentials/src/plugin.yml
+++ b/Essentials/src/plugin.yml
@@ -129,7 +129,7 @@ commands:
aliases: [gm,creative,creativemode,survival,survivalmode,adventure,adventuremode,gmc,gma,gms,gmt,egamemod,eecreative,ecreativemode,esurvival,esurvivalmode,eadventure,eadventuremode,egmc,egma,egms,egm,egmt]
gc:
description: Reports memory, uptime and tick info.
- usage: /<command>
+ usage: /<command> [all]
aliases: [elag,lag,mem,memory,egc,emem,ememory,uptime,euptime]
getpos:
description: Get your current coordinates or those of a player.