mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-10 16:48:05 +02:00
Adding full keyword support for newb join message.
Also adding {ADDRESS} and {USERNAME} as new keywords.
This commit is contained in:
@@ -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");
|
||||
|
Reference in New Issue
Block a user