diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/Configuration.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/Configuration.java index d663fb8..47e8b8e 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/Configuration.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/Configuration.java @@ -114,6 +114,7 @@ public class Configuration { @Getter public int port; @Getter public String username; @Getter public boolean kaboom = false; + @Getter public boolean creayun = false; @Getter public String serverName; @Getter @Setter public boolean useCore = true; @Getter @Setter public boolean useChat = false; diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/chatParsers/CreayunChatParser.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/chatParsers/CreayunChatParser.java index 98ff79a..62de208 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/chatParsers/CreayunChatParser.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/chatParsers/CreayunChatParser.java @@ -29,7 +29,7 @@ public class CreayunChatParser implements ChatParser { public PlayerMessage parse (Component message) { final String stringified = ComponentUtilities.stringify(message); - if (stringified.length() > 512) return null; // will this fix the fard problem? + if (bot.options().creayun()) return null; final Matcher matcher = PATTERN.matcher(stringified); diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/PlayersPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/PlayersPlugin.java index 63a5a8c..16bf023 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/PlayersPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/PlayersPlugin.java @@ -137,7 +137,7 @@ public class PlayersPlugin extends Bot.Listener { object.addProperty("uuid", target.profile().getIdAsString()); object.add("lastSeen", new JsonObject()); - playersObject.add(target.profile().getName(), object); + playersObject.add(bot.options().creayun() ? target.profile().getName().replaceAll("ยง.", "") : target.profile().getName(), object); PersistentDataUtilities.put("players", playersObject); } else for (Listener listener : listeners) { listener.playerUnVanished(target); } diff --git a/src/main/resources/default-config.yml b/src/main/resources/default-config.yml index 4c3f022..67defb7 100644 --- a/src/main/resources/default-config.yml +++ b/src/main/resources/default-config.yml @@ -83,7 +83,8 @@ selfCare: username: true # MIGHT cause problem(s) if set to false (not tested,.,.) bots: # username - optional, if not specified it will just use a random username - # kaboom - defaults to false mabe + # kaboom - defaults to false + # creayun - same as kaboom # serverName - name it whatever you like, it will be used as server name in trusted broadcast and in console # useCore - if enabled it just sends the command using chat instead of using core. recommended to enable useChat too when this is enabled # useChat - when the bot tellraws it will chat instead of using the core to run tellraw @@ -94,6 +95,7 @@ bots: port: 25565 username: 'ChomeNS_Bot' kaboom: false + creayun: false serverName: 'Localhost' useCore: true useChat: false