QOL #203
@ -57,7 +57,8 @@ public class EventListener implements Listener {
|
||||
|
||||
static {
|
||||
Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), () -> {
|
||||
LAST_FS.entrySet().removeIf(entry -> TPSUtils.currentTick.get() - entry.getValue() > 4);
|
||||
long millis = System.currentTimeMillis();
|
||||
LAST_FS.entrySet().removeIf(entry -> millis - entry.getValue() > 200);
|
||||
}, 2, 2);
|
||||
}
|
||||
|
||||
@ -77,7 +78,7 @@ public class EventListener implements Listener {
|
||||
if (LAST_FS.containsKey(event.getPlayer())) {
|
||||
ScriptRunner.callEvent(event.getPlayer(), SteamWarGlobalLuaPlugin.EventType.DoubleSwap, LuaValue.NIL, event);
|
||||
} else {
|
||||
LAST_FS.put(event.getPlayer(), TPSUtils.currentTick.get());
|
||||
LAST_FS.put(event.getPlayer(), System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren