hopefully fix the custom chat issue

fard fard
This commit is contained in:
Chayapak 2023-05-05 10:15:24 +07:00
parent 24f7e08e4c
commit 8edc6cf395

View file

@ -1,5 +1,6 @@
package land.chipmunk.chipmunkmod.modules;
import com.google.gson.JsonElement;
import land.chipmunk.chipmunkmod.ChipmunkMod;
import land.chipmunk.chipmunkmod.data.MutablePlayerListEntry;
import lombok.Getter;
@ -18,10 +19,15 @@ public class CustomChat {
@Getter @Setter private boolean enabled = true;
@Getter @Setter private String format = ChipmunkMod.CONFIG.customChat.format.toString();
@Getter @Setter private String format;
public CustomChat (MinecraftClient client) {
this.client = client;
final JsonElement formatString = ChipmunkMod.CONFIG.customChat.format;
if (formatString == null) format = "{\"translate\":\"chat.type.text\",\"with\":[\"USERNAME\",\"MESSAGE\"]}";
else format = formatString.toString();
}
public void chat (String message) {