summaryrefslogtreecommitdiffstats
path: root/EssentialsSpawn/src
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-02-18 21:09:18 +0000
committerKHobbits <rob@khobbits.co.uk>2012-02-18 21:09:18 +0000
commit945ae71480c1810d3e59e8b8557371be2fb251ba (patch)
tree078afbbaadbae5ff71461572066a91ad88081e78 /EssentialsSpawn/src
parentfab9688abb8ac18820a6664d22c52931bda7fc70 (diff)
downloadEssentials-945ae71480c1810d3e59e8b8557371be2fb251ba.tar
Essentials-945ae71480c1810d3e59e8b8557371be2fb251ba.tar.gz
Essentials-945ae71480c1810d3e59e8b8557371be2fb251ba.tar.lz
Essentials-945ae71480c1810d3e59e8b8557371be2fb251ba.tar.xz
Essentials-945ae71480c1810d3e59e8b8557371be2fb251ba.zip
Adding full keyword support for newb join message.
Also adding {ADDRESS} and {USERNAME} as new keywords.
Diffstat (limited to 'EssentialsSpawn/src')
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
index b68b4e350..083fd66a5 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
@@ -4,6 +4,9 @@ import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.OfflinePlayer;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.textreader.IText;
+import com.earth2me.essentials.textreader.KeywordReplacer;
+import com.earth2me.essentials.textreader.SimpleTextPager;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Bukkit;
@@ -73,7 +76,9 @@ public class EssentialsSpawnPlayerListener implements Listener
if (ess.getSettings().getAnnounceNewPlayers())
{
- ess.broadcastMessage(user, ess.getSettings().getAnnounceNewPlayerFormat(user));
+ final IText output = new KeywordReplacer(ess.getSettings().getAnnounceNewPlayerFormat(), user, ess);
+ final SimpleTextPager pager = new SimpleTextPager(output);
+ ess.broadcastMessage(user, pager.getString(0));
}
LOGGER.log(Level.FINE, "New player join");