Switched to Username only (no nicknames) till colors can be fixed (for party users)
This commit is contained in:
@@ -177,10 +177,11 @@ public class Queries {
|
||||
while (resultSet.next()) {
|
||||
int id = resultSet.getInt("party_id");
|
||||
UUID uuid = UUID.fromString(resultSet.getString("uuid"));
|
||||
String displayName = resultSet.getString("nickname");
|
||||
if (displayName == null || displayName.isEmpty()) {
|
||||
displayName = resultSet.getString("Username");
|
||||
}
|
||||
// String displayName = resultSet.getString("nickname");
|
||||
// if (displayName == null || displayName.isEmpty()) {
|
||||
// displayName = resultSet.getString("Username");
|
||||
// }
|
||||
String displayName = resultSet.getString("Username"); // FIXME: 08/08/2021 only using display name till we can fix nickname colors
|
||||
|
||||
Party party = PartyManager.getParty(id);
|
||||
if (party == null) {
|
||||
|
||||
@@ -50,9 +50,5 @@ public class PartyManager {
|
||||
|
||||
public static void loadParties() {
|
||||
Queries.loadParties();
|
||||
for (ChatUser chatUser : ChatUserManager.getChatUsers()) {
|
||||
Party party = getParty(chatUser.getPartyId());
|
||||
if (party != null) party.addUser(chatUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,11 @@ public class Party {
|
||||
this.partyUsers.put(uuid, displayName);
|
||||
}
|
||||
|
||||
public void addUser(ChatUser partyUser) {
|
||||
this.partyUsers.put(partyUser.getUuid(), PlainComponentSerializer.plain().serialize(partyUser.getDisplayName()));
|
||||
public void addUser(ChatUser partyUser, String displayName) {
|
||||
// this.partyUsers.put(partyUser.getUuid(), PlainComponentSerializer.plain().serialize(partyUser.getDisplayName()));
|
||||
// partyUser.setPartyId(getPartyId());
|
||||
// Queries.addPartyUser(partyUser);
|
||||
this.partyUsers.put(partyUser.getUuid(), displayName);
|
||||
partyUser.setPartyId(getPartyId());
|
||||
Queries.addPartyUser(partyUser);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user