mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-03-02 10:31:25 +01:00
Fixed respawning (again)
This commit is contained in:
parent
ad78a91aab
commit
243cea5102
@ -3,7 +3,7 @@ name: NoCheat
|
||||
author: Evenprime
|
||||
|
||||
main: cc.co.evenprime.bukkit.nocheat.NoCheat
|
||||
version: 1.09
|
||||
version: 1.09b
|
||||
|
||||
softdepend: [ Permissions, CraftIRC ]
|
||||
|
||||
|
@ -118,7 +118,7 @@ public class MovingCheck extends Check {
|
||||
|
||||
if(runCheck) {
|
||||
result += Math.max(0D, runningCheck.check(from, to,
|
||||
player.isSneaking(), (fromType & toType & MovingEventHelper.LIQUID) > 0, data));
|
||||
!allowFakeSneak && player.isSneaking(), !allowFastSwim && (fromType & toType & MovingEventHelper.LIQUID) > 0, data));
|
||||
}
|
||||
|
||||
|
||||
@ -539,6 +539,7 @@ public class MovingCheck extends Check {
|
||||
pm.registerEvent(Event.Type.ENTITY_DAMAGE, new MovingEntityListener(this), Priority.Monitor, plugin);
|
||||
pm.registerEvent(Event.Type.PLAYER_TELEPORT, new MovingPlayerMonitor(this), Priority.Monitor, plugin);
|
||||
pm.registerEvent(Event.Type.PLAYER_PORTAL, new MovingPlayerMonitor(this), Priority.Monitor, plugin);
|
||||
pm.registerEvent(Event.Type.PLAYER_RESPAWN, new MovingPlayerMonitor(this), Priority.Monitor, plugin);
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,9 +6,9 @@ import cc.co.evenprime.bukkit.nocheat.data.MovingData;
|
||||
|
||||
public class RunningCheck {
|
||||
|
||||
private final static double stepWidth = 0.22D;
|
||||
private final static double sneakWidth = 0.14D;
|
||||
private final static double swimWidth = 0.18D;
|
||||
public final static double stepWidth = 0.22D;
|
||||
public final static double sneakWidth = 0.14D;
|
||||
public final static double swimWidth = 0.18D;
|
||||
|
||||
public RunningCheck() { }
|
||||
|
||||
|
@ -4,6 +4,7 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerListener;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.event.player.PlayerPortalEvent;
|
||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.MovingCheck;
|
||||
@ -21,6 +22,12 @@ public class MovingPlayerMonitor extends PlayerListener {
|
||||
public MovingPlayerMonitor(MovingCheck check) {
|
||||
this.check = check;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerRespawn(PlayerRespawnEvent event) {
|
||||
MovingData data = MovingData.get(event.getPlayer());
|
||||
data.wasTeleported = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerPortal(PlayerPortalEvent event) {
|
||||
|
Loading…
Reference in New Issue
Block a user