mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 14:46:45 +01:00
Allow duplicates after 5s
This commit is contained in:
parent
3ce225c044
commit
f5e7d08ace
@ -67,8 +67,9 @@ public class BukkitPlayer extends PlotPlayer {
|
||||
|
||||
@Override
|
||||
public void sendMessage(String message) {
|
||||
if (!StringMan.isEqual(this.<String>getMeta("lastMessage"), message)) {
|
||||
if (!StringMan.isEqual(this.<String>getMeta("lastMessage"), message) || (System.currentTimeMillis() - this.<Long>getMeta("lastMessageTime") > 5000)) {
|
||||
setMeta("lastMessage", message);
|
||||
setMeta("lastMessageTime", System.currentTimeMillis());
|
||||
this.player.sendMessage(message);
|
||||
}
|
||||
}
|
||||
|
@ -74,8 +74,9 @@ public class SpongePlayer extends PlotPlayer {
|
||||
|
||||
@Override
|
||||
public void sendMessage(String message) {
|
||||
if (!StringMan.isEqual(this.<String>getMeta("lastMessage"), message)) {
|
||||
if (!StringMan.isEqual(this.<String>getMeta("lastMessage"), message) || (System.currentTimeMillis() - this.<Long>getMeta("lastMessageTime") > 5000)) {
|
||||
setMeta("lastMessage", message);
|
||||
setMeta("lastMessageTime", System.currentTimeMillis());
|
||||
this.player.sendMessage(ChatTypes.CHAT, TextSerializers.LEGACY_FORMATTING_CODE.deserialize(message));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user