diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-02-18 21:09:18 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-02-18 21:09:18 +0000 |
commit | d0c89f4e9f4df6756707031ba397c7e8185f9c42 (patch) | |
tree | 4d192590a56d551b931a29311fddeee309724e85 /EssentialsSpawn | |
parent | bccd39a62385561d74a5de3613e42a8a8ed4c56f (diff) | |
download | Essentials-d0c89f4e9f4df6756707031ba397c7e8185f9c42.tar Essentials-d0c89f4e9f4df6756707031ba397c7e8185f9c42.tar.gz Essentials-d0c89f4e9f4df6756707031ba397c7e8185f9c42.tar.lz Essentials-d0c89f4e9f4df6756707031ba397c7e8185f9c42.tar.xz Essentials-d0c89f4e9f4df6756707031ba397c7e8185f9c42.zip |
Adding full keyword support for newb join message.
Also adding {ADDRESS} and {USERNAME} as new keywords.
Diffstat (limited to 'EssentialsSpawn')
-rw-r--r-- | EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java | 7 |
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"); |