mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
Repeated messages are forgotten after a time
This commit is contained in:
1 parent
81ddcb0615
commit
c8f97ca639
2 files changed
+7
-5
No files matched your search
@@ -37,8 +37,6 @@ import org.bukkit.event.entity.ProjectileLaunchEvent;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||
import org.bukkit.event.player.*;
|
||||
import org.bukkit.inventory.PlayerInventory;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public class PlayerListener extends EventListener
|
||||
{
|
||||
|
||||
@@ -86,6 +86,7 @@ public class Backend
|
||||
private static final int HEAL_MIN = 35;
|
||||
private static final int ANIMATION_MIN = 60;
|
||||
private static final int CHAT_MIN = 100;
|
||||
private static final int CHAT_REPEAT_MIN = 260;
|
||||
private static final int BOW_MIN = 2;
|
||||
private static final int SPRINT_MIN = 2;
|
||||
private static final int BLOCK_BREAK_MIN = 1;
|
||||
@@ -705,7 +706,8 @@ public class Backend
|
||||
String name = player.getName();
|
||||
if(lastMessage.get(name) == null)
|
||||
{
|
||||
lastMessage.put(name, msg);
|
||||
logEvent(lastMessage,player,msg,CHAT_REPEAT_MIN);
|
||||
//lastMessage.put(name, msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -715,8 +717,10 @@ public class Backend
|
||||
}
|
||||
else
|
||||
{
|
||||
oldMessage.put(name, lastMessage.get(name));
|
||||
lastMessage.put(name, msg);
|
||||
logEvent(oldMessage,player,lastMessage.get(name),CHAT_REPEAT_MIN);
|
||||
//oldMessage.put(name, lastMessage.get(name));
|
||||
logEvent(oldMessage,player,msg,CHAT_REPEAT_MIN);
|
||||
//lastMessage.put(name, msg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user