mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-20 02:11:57 +00:00
Format {UNIQUE} in custom join message.
This commit is contained in:
parent
79401c3cf7
commit
535fb43915
|
@ -27,6 +27,7 @@ import org.bukkit.inventory.InventoryHolder;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.text.NumberFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -253,7 +254,9 @@ public class EssentialsPlayerListener implements Listener {
|
||||||
} else if (message == null) {
|
} else if (message == null) {
|
||||||
//NOOP
|
//NOOP
|
||||||
} else if (ess.getSettings().isCustomJoinMessage()) {
|
} else if (ess.getSettings().isCustomJoinMessage()) {
|
||||||
String msg = ess.getSettings().getCustomJoinMessage().replace("{PLAYER}", player.getDisplayName()).replace("{USERNAME}", player.getName()).replace("{UNIQUE}", String.valueOf(ess.getUserMap().getUniqueUsers()));
|
String msg = ess.getSettings().getCustomJoinMessage()
|
||||||
|
.replace("{PLAYER}", player.getDisplayName()).replace("{USERNAME}", player.getName())
|
||||||
|
.replace("{UNIQUE}", NumberFormat.getInstance().format(ess.getUserMap().getUniqueUsers()));
|
||||||
ess.getServer().broadcastMessage(msg);
|
ess.getServer().broadcastMessage(msg);
|
||||||
} else if (ess.getSettings().allowSilentJoinQuit()) {
|
} else if (ess.getSettings().allowSilentJoinQuit()) {
|
||||||
ess.getServer().broadcastMessage(message);
|
ess.getServer().broadcastMessage(message);
|
||||||
|
|
Loading…
Reference in a new issue