mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2025-01-27 02:21:24 +01:00
Added cooldowns for world events and teleporting in case a plugin warps you or you change world
This commit is contained in:
parent
9e371b7a97
commit
de987f0555
@ -74,6 +74,16 @@ public class Listeners implements Listener {
|
||||
Portal.cooldown.put(event.getPlayer().getName(), System.currentTimeMillis());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onWorldChangeEvent(PlayerChangedWorldEvent event) {
|
||||
Portal.cooldown.put(event.getPlayer().getName(), System.currentTimeMillis());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onTeleportEvent(PlayerTeleportEvent event) {
|
||||
Portal.cooldown.put(event.getPlayer().getName(), System.currentTimeMillis());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onLeaveEvent(PlayerQuitEvent event) {
|
||||
Portal.cooldown.remove(event.getPlayer().getName());
|
||||
|
Loading…
Reference in New Issue
Block a user