add MENTIONPLAYERTAG to Config.java
This commit is contained in:
parent
9d7f944c88
commit
ffa90b5c94
|
|
@ -172,6 +172,7 @@ public final class Config {
|
||||||
public static String CONSOLENAME = "Console";
|
public static String CONSOLENAME = "Console";
|
||||||
public static UUID CONSOLEUUID = UUID.randomUUID();
|
public static UUID CONSOLEUUID = UUID.randomUUID();
|
||||||
public static int EMOTELIMIT = 3;
|
public static int EMOTELIMIT = 3;
|
||||||
|
public static String MENTIONPLAYERTAG = "<aqua>@</aqua>";
|
||||||
private static void settings() {
|
private static void settings() {
|
||||||
PREFIXGROUPS = getList("settings.prefix-groups",
|
PREFIXGROUPS = getList("settings.prefix-groups",
|
||||||
Lists.newArrayList("discord", "socialmedia", "eventteam", "eventleader", "youtube", "twitch", "developer"));
|
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()));
|
CONSOLEUUID = UUID.fromString(getString("settings.console-uuid", CONSOLEUUID.toString()));
|
||||||
MINIMIUMSTAFFRANK = getString("settings.minimum-staff-rank", MINIMIUMSTAFFRANK);
|
MINIMIUMSTAFFRANK = getString("settings.minimum-staff-rank", MINIMIUMSTAFFRANK);
|
||||||
EMOTELIMIT = getInt("settings.emote-limit", EMOTELIMIT);
|
EMOTELIMIT = getInt("settings.emote-limit", EMOTELIMIT);
|
||||||
|
MENTIONPLAYERTAG = getString("settings.mention-player-tag", MENTIONPLAYERTAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<String> MESSAGECOMMANDALIASES = new ArrayList<>();
|
public static List<String> MESSAGECOMMANDALIASES = new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ public class ChatListener implements Listener {
|
||||||
event.result(formatComponent.replaceText(TextReplacementConfig.builder().match("%message%").replacement(message).build()));
|
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)
|
@EventHandler(ignoreCancelled = true)
|
||||||
public void onPlayerChat(AsyncChatEvent event) {
|
public void onPlayerChat(AsyncChatEvent event) {
|
||||||
event.setCancelled(true); //Always cancel the event because we do not want to deal with Microsoft's stupid bans
|
event.setCancelled(true); //Always cancel the event because we do not want to deal with Microsoft's stupid bans
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user