mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-06 18:50:54 +01:00
Ensure TeleportCause.PLUGIN is used for teleporting.
This commit is contained in:
parent
65b3c4440d
commit
8eebda863f
@ -888,7 +888,7 @@ public class MovingListener extends CheckListener implements TickListener, IRemo
|
||||
// public void run() {
|
||||
// if (!data.hasSetBackWorldChanged(setBack)) { // && data.isSetBack(setBack)) {
|
||||
// player.sendMessage("SETBACK FROM MC DERP.");
|
||||
// player.teleport(setBack);
|
||||
// player.teleport(setBack, TeleportCause.PLUGIN);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
@ -1390,7 +1390,7 @@ public class MovingListener extends CheckListener implements TickListener, IRemo
|
||||
final Location newTo = enforceLocation(player, player.getLocation(useLoc), data);
|
||||
if (newTo != null) {
|
||||
data.setTeleported(newTo);
|
||||
player.teleport(newTo);
|
||||
player.teleport(newTo, TeleportCause.PLUGIN);
|
||||
}
|
||||
}
|
||||
if (!rem.isEmpty()) {
|
||||
|
@ -8,6 +8,7 @@ import java.util.Set;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||
|
||||
import fr.neatmonster.nocheatplus.actions.ParameterName;
|
||||
import fr.neatmonster.nocheatplus.checks.Check;
|
||||
@ -1313,7 +1314,7 @@ public class SurvivalFly extends Check {
|
||||
if (data.hasSetBack()) {
|
||||
final Location newTo = data.getSetBack(loc);
|
||||
data.prepareSetBack(newTo);
|
||||
player.teleport(newTo);
|
||||
player.teleport(newTo, TeleportCause.PLUGIN);
|
||||
}
|
||||
else{
|
||||
// Solve by extra actions ? Special case (probably never happens)?
|
||||
|
Loading…
Reference in New Issue
Block a user