feat: configurable self cares

This commit is contained in:
Chayapak Supasakul 2025-04-14 09:29:06 +07:00
parent 3e05e6b89d
commit bb8bb88489
Signed by: ChomeNS
SSH key fingerprint: SHA256:0YoxhdyXsgbc0nfeB2N6FYE60mxMU7DS4uCUMaw2mvA
2 changed files with 11 additions and 3 deletions

View file

@ -13,6 +13,7 @@ public class Configuration {
public CommandCore core = new CommandCore();
public Bots bots = new Bots();
public CustomChat customChat = new CustomChat();
public SelfCare selfCare = new SelfCare();
public String autoSkinUsername = "off";
@ConfigSerializable
@ -66,6 +67,13 @@ public class Configuration {
}
}
@ConfigSerializable
public static class SelfCare {
public boolean cspy = true;
public boolean gameMode = true;
public boolean op = true;
}
@ConfigSerializable
public static class CustomChat {
public @NotNull Component format =

View file

@ -21,9 +21,9 @@ public class SelfCare implements Listener {
public final long interval;
public final long chatInterval;
public boolean opEnabled = true;
public boolean gamemodeEnabled = true;
public boolean cspyEnabled = true;
public boolean opEnabled = ChipmunkMod.CONFIG.selfCare.op;
public boolean gamemodeEnabled = ChipmunkMod.CONFIG.selfCare.gameMode;
public boolean cspyEnabled = ChipmunkMod.CONFIG.selfCare.cspy;
private int gameMode;