add MENTIONPLAYERTAG to Config.java

This commit is contained in:
Len 2023-07-15 17:45:03 +02:00
parent 9d7f944c88
commit ffa90b5c94
2 changed files with 3 additions and 1 deletions

View File

@ -172,6 +172,7 @@ public final class Config {
public static String CONSOLENAME = "Console";
public static UUID CONSOLEUUID = UUID.randomUUID();
public static int EMOTELIMIT = 3;
public static String MENTIONPLAYERTAG = "<aqua>@</aqua>";
private static void settings() {
PREFIXGROUPS = getList("settings.prefix-groups",
Lists.newArrayList("discord", "socialmedia", "eventteam", "eventleader", "youtube", "twitch", "developer"));
@ -183,6 +184,7 @@ public final class Config {
CONSOLEUUID = UUID.fromString(getString("settings.console-uuid", CONSOLEUUID.toString()));
MINIMIUMSTAFFRANK = getString("settings.minimum-staff-rank", MINIMIUMSTAFFRANK);
EMOTELIMIT = getInt("settings.emote-limit", EMOTELIMIT);
MENTIONPLAYERTAG = getString("settings.mention-player-tag", MENTIONPLAYERTAG);
}
public static List<String> MESSAGECOMMANDALIASES = new ArrayList<>();

View File

@ -60,7 +60,7 @@ public class ChatListener implements Listener {
event.result(formatComponent.replaceText(TextReplacementConfig.builder().match("%message%").replacement(message).build()));
}
private final Component mention = MiniMessage.miniMessage().deserialize("<aqua>@</aqua>"); //TODO move to config
private final Component mention = MiniMessage.miniMessage().deserialize(Config.MENTIONPLAYERTAG);
@EventHandler(ignoreCancelled = true)
public void onPlayerChat(AsyncChatEvent event) {
event.setCancelled(true); //Always cancel the event because we do not want to deal with Microsoft's stupid bans