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

@@ -135,9 +135,17 @@ public class Room extends MineNetInstance implements Spawnable {
Room.unsetRoom(p);
new ChatMessage(Icon.ERROR).appendStatic("The room leader left!").send(this.getAllMembers());
new ChatMessage(Icon.SCIENCE).appendStatic(this.owner.getUsername()).appendStatic(" is the new Leader!").send(this.getAllMembers().stream().filter(player -> player != this.owner).collect(Collectors.toSet()));
new ChatMessage(Icon.SUCCESS).appendStatic("You are now the leader.").send(this.owner);
new ChatMessage(Icon.ERROR)
.appendTranslated("room#ownerLeft")
.send(this.getAllMembers());
new ChatMessage(Icon.SCIENCE)
.appendStatic(this.owner.getUsername())
.appendSpace()
.appendTranslated("room#newOwnerAnnounce")
.send(this.getAllMembers().stream().filter(player -> player != this.owner).collect(Collectors.toSet()));
new ChatMessage(Icon.SUCCESS)
.appendTranslated("room#ownerSelf")
.send(this.owner);
});
}

View File

@@ -37,7 +37,9 @@ public class GameSelector extends InteractableEntity {
if(playerEntityInteractEvent.getPlayer() != room.getOwner()) {
abstractVillagerMeta.setHeadShakeTimer(20);
new ChatMessage(Icon.ERROR).appendStatic("Only the room leader can start games!").send(playerEntityInteractEvent.getPlayer());
new ChatMessage(Icon.ERROR)
.appendTranslated("room#onlyOwnerCanStart")
.send(playerEntityInteractEvent.getPlayer());
return;
}