Hotfix DiscordChatRoom

This commit is contained in:
2025-03-13 17:14:17 +01:00
parent 9eca9ab990
commit 50b6947312
2 changed files with 7 additions and 3 deletions
@@ -213,10 +213,14 @@ public interface Chatter {
} }
static Chatter of(SteamwarUser user) { static Chatter of(SteamwarUser user) {
return of(user.getUUID()); return of(user.getUUID(), false);
} }
static Chatter of(UUID uuid) { static Chatter of(UUID uuid) {
return of(uuid, false);
}
static Chatter of(UUID uuid, boolean playerlessChatShown) {
Player player = VelocityCore.getProxy().getPlayer(uuid).orElse(null); Player player = VelocityCore.getProxy().getPlayer(uuid).orElse(null);
if(player != null) if(player != null)
return Chatter.of(player); return Chatter.of(player);
@@ -229,7 +233,7 @@ public interface Chatter {
@Override @Override
public boolean chatShown() { public boolean chatShown() {
return false; return playerlessChatShown;
} }
@Override @Override
@@ -47,6 +47,6 @@ public class DiscordChatRoom extends DiscordChannel {
return; return;
} }
ChatListener.sendChat(Chatter.of(user), target.get(), format, null, event.getMessage().getContentDisplay().replace('§', '&').replace('\n', ' ')); ChatListener.sendChat(Chatter.of(user.getUUID(), true), target.get(), format, null, event.getMessage().getContentDisplay().replace('§', '&').replace('\n', ' '));
} }
} }