summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhyperia <khyperia@live.com>2011-12-05 06:55:06 +0800
committersnowleo <schneeleo@gmail.com>2011-12-05 06:56:20 +0800
commit2b919faa7beb3ae2634331aaca42bece966c193e (patch)
tree35964a198ac37e110969bdca06c321d07a6b176f
parentb2ffdc9774569108d018bd3a2933aa67c8262a36 (diff)
downloadEssentials-2b919faa7beb3ae2634331aaca42bece966c193e.tar
Essentials-2b919faa7beb3ae2634331aaca42bece966c193e.tar.gz
Essentials-2b919faa7beb3ae2634331aaca42bece966c193e.tar.lz
Essentials-2b919faa7beb3ae2634331aaca42bece966c193e.tar.xz
Essentials-2b919faa7beb3ae2634331aaca42bece966c193e.zip
Added {VERSION} to motd
Test #1198
-rw-r--r--Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java
index 7a401164a..182dba9d3 100644
--- a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java
+++ b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java
@@ -30,6 +30,7 @@ public class KeywordReplacer implements IText
String displayName, ipAddress, balance, mails, world;
String worlds, online, unique, playerlist, date, time;
String worldTime12, worldTime24, worldDate, plugins;
+ String version;
if (sender instanceof Player)
{
final User user = ess.getUser(sender);
@@ -97,6 +98,8 @@ public class KeywordReplacer implements IText
date = DateFormat.getDateInstance(DateFormat.MEDIUM, ess.getI18n().getCurrentLocale()).format(new Date());
time = DateFormat.getTimeInstance(DateFormat.MEDIUM, ess.getI18n().getCurrentLocale()).format(new Date());
+
+ version = ess.getServer().getVersion();
for (int i = 0; i < input.getLines().size(); i++)
{
@@ -116,6 +119,7 @@ public class KeywordReplacer implements IText
line = line.replace("{WORLDTIME24}", worldTime24);
line = line.replace("{WORLDDATE}", worldDate);
line = line.replace("{PLUGINS}", plugins);
+ line = line.replace("{VERSION}", version);
input.getLines().set(i, line);
}
}