mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-21 15:01:29 +01:00
Add another safeguard for interworld teleports
This commit is contained in:
parent
2fafc0a75d
commit
df80b3c66a
@ -9,6 +9,7 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
|
import org.bukkit.event.player.PlayerChangedWorldEvent;
|
||||||
import org.bukkit.event.player.PlayerMoveEvent;
|
import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
import org.bukkit.event.player.PlayerPortalEvent;
|
import org.bukkit.event.player.PlayerPortalEvent;
|
||||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||||
@ -99,6 +100,14 @@ public class MovingCheckListener implements Listener, EventManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
|
public void worldChange(final PlayerChangedWorldEvent event) {
|
||||||
|
final MovingData data = MovingCheck.getData(plugin.getPlayer(event.getPlayer()).getDataStore());
|
||||||
|
data.teleportTo.reset();
|
||||||
|
data.clearRunFlyData();
|
||||||
|
data.clearMorePacketsData();
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
public void portal(final PlayerPortalEvent event) {
|
public void portal(final PlayerPortalEvent event) {
|
||||||
final MovingData data = MovingCheck.getData(plugin.getPlayer(event.getPlayer()).getDataStore());
|
final MovingData data = MovingCheck.getData(plugin.getPlayer(event.getPlayer()).getDataStore());
|
||||||
|
Loading…
Reference in New Issue
Block a user