added translation to all messages, ChatFormatHandler and new chat icons

This commit is contained in:
2025-10-16 00:24:48 +02:00
parent d083ca3e1a
commit c301e775c9
16 changed files with 225 additions and 166 deletions

View File

@@ -8,7 +8,10 @@ public enum Icon {
STAR("\u2606", NamedTextColor.GOLD),
CHAT("\u276F\u276F", NamedTextColor.WHITE),
SUCCESS("\u2714", NamedTextColor.GREEN),
ERROR("\u274C", NamedTextColor.RED);
ERROR("\u274C", NamedTextColor.RED),
TIME("\u231B", NamedTextColor.YELLOW),
INFO("\uD83D\uDD14", NamedTextColor.AQUA),
LEAVE("\u2B05", NamedTextColor.DARK_GRAY);
private final String symbol;
private final NamedTextColor color;

View File

@@ -31,8 +31,23 @@ public abstract class TranslatableMessage implements Sendable {
return this;
}
public TranslatableMessage appendSpace() {
chain.add(Component.text(" "));
return this;
}
public TranslatableMessage appendTranslated(String mapId) {
chain.add(TranslatedComponent.byId(mapId));
chain.add(TranslatedComponent.byId(mapId).setColor(NamedTextColor.WHITE));
return this;
}
public TranslatableMessage appendTranslated(String mapId, NamedTextColor color) {
chain.add(TranslatedComponent.byId(mapId).setColor(color));
return this;
}
public TranslatableMessage appendTranslated(TranslatedComponent component) {
chain.add(component);
return this;
}