Renamed chatState to partyChatState

This commit is contained in:
Teriuihi 2021-05-16 02:02:03 +02:00
parent ffd9430a65
commit c15da75114
2 changed files with 9 additions and 9 deletions

View File

@ -321,7 +321,7 @@ public class Queries {
statement.setString(1, user.getUuid().toString()); statement.setString(1, user.getUuid().toString());
statement.setInt(2, user.getPartyId()); statement.setInt(2, user.getPartyId());
statement.setInt(3, user.toggledChat() ? 1 : 0); statement.setInt(3, user.toggledPartyChat() ? 1 : 0);
statement.setInt(4, user.ForceTp() ? 1 : 0); statement.setInt(4, user.ForceTp() ? 1 : 0);
statement.setInt(5, user.isGcOn() ? 1 : 0); statement.setInt(5, user.isGcOn() ? 1 : 0);
@ -331,7 +331,7 @@ public class Queries {
} }
} }
public static void setChatState(boolean toggledChat, UUID uuid) { public static void setPartyChatState(boolean toggledChat, UUID uuid) {
setBitWhereId("UPDATE chat_users set toggled_chat = ? WHERE uuid = ?", toggledChat, uuid); setBitWhereId("UPDATE chat_users set toggled_chat = ? WHERE uuid = ?", toggledChat, uuid);
} }

View File

@ -9,7 +9,7 @@ import java.util.UUID;
public class ChatUser { public class ChatUser {
private final UUID uuid; private final UUID uuid;
private final int partyId; private final int partyId;
private boolean toggledChat; private boolean toggledPartyChat;
private boolean forceTp; private boolean forceTp;
private String displayName; private String displayName;
private String prefix; private String prefix;
@ -26,7 +26,7 @@ public class ChatUser {
public ChatUser(UUID uuid, int partyId, boolean toggled_chat, boolean force_tp, boolean toggle_Gc) { public ChatUser(UUID uuid, int partyId, boolean toggled_chat, boolean force_tp, boolean toggle_Gc) {
this.uuid = uuid; this.uuid = uuid;
this.partyId = partyId; this.partyId = partyId;
this.toggledChat = toggled_chat; this.toggledPartyChat = toggled_chat;
this.forceTp = force_tp; this.forceTp = force_tp;
displayName = Queries.getNickname(uuid); displayName = Queries.getNickname(uuid);
@ -52,13 +52,13 @@ public class ChatUser {
return partyId; return partyId;
} }
public boolean toggledChat() { public boolean toggledPartyChat() {
return toggledChat; return toggledPartyChat;
} }
public void toggleChat() { public void togglePartyChat() {
toggledChat = !toggledChat; toggledPartyChat = !toggledPartyChat;
Queries.setChatState(toggledChat, uuid); //TODO: Async pls Queries.setPartyChatState(toggledPartyChat, uuid); //TODO: Async pls
} }
public boolean ForceTp() { public boolean ForceTp() {