Don't forget about reply
This commit is contained in:
parent
b50e773536
commit
1e3095d396
|
|
@ -15,7 +15,7 @@ public class ChatUser {
|
||||||
private String staffPrefix; // 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 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 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 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 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<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
|
||||||
|
|
@ -102,11 +102,11 @@ public class ChatUser {
|
||||||
return toggleGc;
|
return toggleGc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID getReplyTarget() {
|
public String getReplyTarget() {
|
||||||
return replyTarget;
|
return replyTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setReplyTarget(UUID replyTarget) {
|
public void setReplyTarget(String replyTarget) {
|
||||||
this.replyTarget = replyTarget;
|
this.replyTarget = replyTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.target>16</maven.compiler.target>
|
<maven.compiler.target>11</maven.compiler.target>
|
||||||
<maven.compiler.source>16</maven.compiler.source>
|
<maven.compiler.source>11</maven.compiler.source>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,7 @@ public class ChatHandler {
|
||||||
|
|
||||||
public void privateMessage(Player player, String target, String message) {
|
public void privateMessage(Player player, String target, String message) {
|
||||||
ChatUser user = ChatUserManager.getChatUser(player.getUniqueId());
|
ChatUser user = ChatUserManager.getChatUser(player.getUniqueId());
|
||||||
|
user.setReplyTarget(target);
|
||||||
Component senderName = player.displayName();
|
|
||||||
String prefix = user.getPrefix();
|
|
||||||
|
|
||||||
message = RegexManager.replaceText(message); // todo a better way for this
|
message = RegexManager.replaceText(message); // todo a better way for this
|
||||||
if(message == null) return; // the message was blocked
|
if(message == null) return; // the message was blocked
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,10 @@ commands:
|
||||||
globalchat:
|
globalchat:
|
||||||
permission: command.globalchat
|
permission: command.globalchat
|
||||||
permission-message: You do not have permission!
|
permission-message: You do not have permission!
|
||||||
aliases: gc
|
aliases: gc
|
||||||
|
message:
|
||||||
|
permission: command.message
|
||||||
|
aliases: msg
|
||||||
|
reply:
|
||||||
|
permission: command.message
|
||||||
|
aliases: r
|
||||||
Loading…
Reference in New Issue
Block a user