forked from SteamWar/SteamWar
Hotfix DiscordChatRoom
This commit is contained in:
@@ -213,10 +213,14 @@ public interface Chatter {
|
||||
}
|
||||
|
||||
static Chatter of(SteamwarUser user) {
|
||||
return of(user.getUUID());
|
||||
return of(user.getUUID(), false);
|
||||
}
|
||||
|
||||
static Chatter of(UUID uuid) {
|
||||
return of(uuid, false);
|
||||
}
|
||||
|
||||
static Chatter of(UUID uuid, boolean playerlessChatShown) {
|
||||
Player player = VelocityCore.getProxy().getPlayer(uuid).orElse(null);
|
||||
if(player != null)
|
||||
return Chatter.of(player);
|
||||
@@ -229,7 +233,7 @@ public interface Chatter {
|
||||
|
||||
@Override
|
||||
public boolean chatShown() {
|
||||
return false;
|
||||
return playerlessChatShown;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -47,6 +47,6 @@ public class DiscordChatRoom extends DiscordChannel {
|
||||
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', ' '));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user