creayun fix mabe mabe

This commit is contained in:
ChomeNS
2023-06-23 19:06:44 +07:00
parent c102214a4b
commit 13b8831d0e
4 changed files with 6 additions and 3 deletions

View File

@@ -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;

View File

@@ -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);

View File

@@ -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); }