some tweaks
This commit is contained in:
@@ -4,7 +4,8 @@ import com.alttd.chat.database.Queries;
|
||||
import com.alttd.chat.util.Utility;
|
||||
import net.kyori.adventure.text.Component;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class ChatUser {
|
||||
@@ -20,9 +21,9 @@ public class ChatUser {
|
||||
private String 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<Mail> 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<UUID> 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<UUID> 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?
|
||||
private List<Mail> 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 List<UUID> 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 List<UUID> 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 toggledChat, boolean toggleGc) {
|
||||
this.uuid = uuid;
|
||||
@@ -45,7 +46,7 @@ public class ChatUser {
|
||||
gcCooldown = System.currentTimeMillis(); // players can't use gc for 30 seconds after logging in if we use this?
|
||||
mails = Queries.getMails(uuid);
|
||||
ignoredPlayers = Queries.getIgnoredUsers(uuid);
|
||||
ignoredBy = new LinkedList<>(); // todo load ignoredPlayers
|
||||
ignoredBy = new ArrayList<>(); // todo load ignoredPlayers
|
||||
}
|
||||
|
||||
public UUID getUuid() {
|
||||
@@ -104,7 +105,7 @@ public class ChatUser {
|
||||
this.replyTarget = replyTarget;
|
||||
}
|
||||
|
||||
public LinkedList<Mail> getMails() {
|
||||
public List<Mail> getMails() {
|
||||
return mails;
|
||||
}
|
||||
|
||||
@@ -112,7 +113,7 @@ public class ChatUser {
|
||||
mails.add(mail);
|
||||
}
|
||||
|
||||
public LinkedList<UUID> getIgnoredPlayers() {
|
||||
public List<UUID> getIgnoredPlayers() {
|
||||
return ignoredPlayers;
|
||||
}
|
||||
|
||||
@@ -124,7 +125,7 @@ public class ChatUser {
|
||||
ignoredPlayers.remove(uuid);
|
||||
}
|
||||
|
||||
public LinkedList<UUID> getIgnoredBy() {
|
||||
public List<UUID> getIgnoredBy() {
|
||||
return ignoredBy;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user