Fix some issues

This commit is contained in:
destro174 2022-01-28 17:04:54 +01:00
parent 615458adab
commit 99babd2120
2 changed files with 2 additions and 8 deletions

View File

@ -373,7 +373,7 @@ public class Queries {
String toggledChannel = resultSet.getString("toggled_channel");
Channel channel = toggledChannel == null ? null : Channel.getChatChannel(toggledChannel);
user = new ChatUser(uuid, partyId, channel);
ChatUserManager.addUser(user);
// ChatUserManager.addUser(user);
}
} catch (SQLException e) {

View File

@ -20,15 +20,9 @@ public final class ChatUserManager {
}
public static void removeUser(ChatUser user) {
chatUsers.remove(user);
chatUsers.remove(user.getUuid());
}
/**
* Get the ChatUser for this player or query the database to read the data.
*
* @param uuid the player who's ChatUser you'd like to get
* @return The ChatUser loaded from database or null if it's not existing.
*/
public static ChatUser getChatUser(UUID uuid) {
return chatUsers.computeIfAbsent(uuid, k -> Queries.loadChatUser(uuid));
}