diff --git a/api/src/main/java/com/alttd/chat/objects/ChatUser.java b/api/src/main/java/com/alttd/chat/objects/ChatUser.java index 8099ef1..8cc3e26 100644 --- a/api/src/main/java/com/alttd/chat/objects/ChatUser.java +++ b/api/src/main/java/com/alttd/chat/objects/ChatUser.java @@ -7,20 +7,21 @@ import java.util.LinkedList; import java.util.UUID; public class ChatUser { - private final UUID uuid; - private final int partyId; - private boolean toggledPartyChat; - private boolean forceTp; - private String displayName; - private String prefix; - private String staffPrefix; - private String prefixAll; - private boolean toggleGc; - private UUID replyTarget; - private long gcCooldown; + private final UUID uuid; // player uuid + private final int partyId; // the party they are in + private boolean toggledPartyChat; // should chat messages instantly go to party chat when added, idk if this should be saved + private boolean forceTp; // idk ask teri + private String displayName; // the nickname, doesn't need to be saved with the chatuser object, could be saved but we can get it from the nicknamesview + private String prefix; // doesn't need saving, we get this from luckperms + private String staffPrefix; // doesn't need saving, we get this from luckperms + private String prefixAll; // doesn't need saving, we get this from luckperms + private boolean toggleGc; // should be saved, this toggles if the player can see and use global chat + private UUID replyTarget; // reply target for use in /msg i don't mind setting this to null on login, feedback? + private long gcCooldown; // the time when they last used gc, is used for the cooldown, i wouldn't save this, but setting this to the login time means they can't use gc for 30 seconds after logging in - private LinkedList mails; - private LinkedList ignoredPlayers; + private LinkedList mails; // mails aren't finalized yet, so for now a table sender, reciever, sendtime, readtime(if emtpy mail isn't read yet?, could also do a byte to control this), the actual message + private LinkedList ignoredPlayers; // a list of UUID, a new table non unique, where one is is the player select * from ignores where ignoredby = thisplayer? where the result is the uuid of the player ignored by this player? + private LinkedList ignoredBy; // a list of UUID, same table as above but select * from ignores where ignored = thisplayer? result should be the other user that ignored this player? public ChatUser(UUID uuid, int partyId, boolean toggled_chat, boolean force_tp, boolean toggle_Gc) { this.uuid = uuid; @@ -43,6 +44,7 @@ public class ChatUser { gcCooldown = System.currentTimeMillis(); // players can't use gc for 30 seconds after logging in if we use this? mails = new LinkedList<>(); // todo load mails ignoredPlayers = new LinkedList<>(); // todo load ignoredPlayers + ignoredBy = new LinkedList<>(); // todo load ignoredPlayers } public UUID getUuid() { @@ -135,6 +137,14 @@ public class ChatUser { ignoredPlayers.add(uuid); } + public LinkedList getIgnoredBy() { + return ignoredBy; + } + + public void addIgnoredBy(UUID uuid) { + ignoredBy.add(uuid); + } + public long getGcCooldown() { return gcCooldown; }