This commit is contained in:
parent
6de72981e6
commit
c216315cf0
1 changed files with 7 additions and 4 deletions
|
@ -34,13 +34,16 @@ public class MessagePacketMixin {
|
||||||
MessageInfo msg = ply_msgs.get(playerUniqueId);
|
MessageInfo msg = ply_msgs.get(playerUniqueId);
|
||||||
long time = System.currentTimeMillis();
|
long time = System.currentTimeMillis();
|
||||||
if (msg.last_msg+msg.msg_delay>time || msg.last_msg_txt.equals(message)) {
|
if (msg.last_msg+msg.msg_delay>time || msg.last_msg_txt.equals(message)) {
|
||||||
msg.msg_delay += 1000;
|
msg.msg_delay += 500;
|
||||||
|
if (msg.msg_delay>10000)
|
||||||
|
msg.msg_delay=10000;
|
||||||
ci.cancel();
|
ci.cancel();
|
||||||
} else
|
} else {
|
||||||
msg.msg_delay=1000;
|
msg.msg_delay = 500;
|
||||||
|
msg.last_msg_txt = message;
|
||||||
|
}
|
||||||
|
|
||||||
msg.last_msg = System.currentTimeMillis();
|
msg.last_msg = System.currentTimeMillis();
|
||||||
msg.last_msg_txt=message;
|
|
||||||
} else {
|
} else {
|
||||||
ply_msgs.put(playerUniqueId,new MessageInfo());
|
ply_msgs.put(playerUniqueId,new MessageInfo());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue