Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
207953cb98
Commit
910762126f
@ -59,7 +59,7 @@ public class EventListener implements Listener {
|
||||
Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), () -> {
|
||||
long millis = System.currentTimeMillis();
|
||||
LAST_FS.entrySet().removeIf(entry -> millis - entry.getValue() > 200);
|
||||
}, 2, 2);
|
||||
}, 1, 1);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
@ -76,7 +76,9 @@ public class EventListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onPlayerSwapHandItems(PlayerSwapHandItemsEvent event) {
|
||||
if (LAST_FS.containsKey(event.getPlayer())) {
|
||||
Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), () -> {
|
||||
ScriptRunner.callEvent(event.getPlayer(), SteamWarGlobalLuaPlugin.EventType.DoubleSwap, LuaValue.NIL, event);
|
||||
}, 1);
|
||||
} else {
|
||||
LAST_FS.put(event.getPlayer(), System.currentTimeMillis());
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren