mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-07 11:10:05 +01:00
Readded "event.setCancelled(true);" for PLAYER_MOVE events, now that I
know that this was not the reason for disappearing players. I wished cancelling move events would actually do what one would expect.
This commit is contained in:
parent
da413e842f
commit
b821292bf2
@ -184,7 +184,7 @@ public class NoCheatConfiguration {
|
|||||||
w.write(" low: loglow reset"); w.newLine();
|
w.write(" low: loglow reset"); w.newLine();
|
||||||
w.write(" med: logmed reset"); w.newLine();
|
w.write(" med: logmed reset"); w.newLine();
|
||||||
w.write(" high: loghigh reset"); w.newLine();
|
w.write(" high: loghigh reset"); w.newLine();
|
||||||
w.write("# Moving specific optionse") ;w.newLine();
|
w.write("# Moving specific options") ; w.newLine();
|
||||||
w.write("moving:"); w.newLine();
|
w.write("moving:"); w.newLine();
|
||||||
w.write("# After how many minor violations should the plugin react (minimum 1)"); w.newLine();
|
w.write("# After how many minor violations should the plugin react (minimum 1)"); w.newLine();
|
||||||
w.write(" freemoves: 5"); w.newLine();
|
w.write(" freemoves: 5"); w.newLine();
|
||||||
|
@ -398,12 +398,13 @@ public class MovingCheck {
|
|||||||
event.setFrom(l);
|
event.setFrom(l);
|
||||||
event.setTo(l);
|
event.setTo(l);
|
||||||
event.getPlayer().teleportTo(l);
|
event.getPlayer().teleportTo(l);
|
||||||
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Lets try it that way. Maybe now people don't "disappear" any longer
|
// Lets try it that way. Maybe now people don't "disappear" any longer
|
||||||
event.setFrom(event.getFrom());
|
|
||||||
event.setTo(event.getFrom().clone());
|
event.setTo(event.getFrom().clone());
|
||||||
event.getPlayer().teleportTo(event.getFrom());
|
event.getPlayer().teleportTo(event.getFrom().clone());
|
||||||
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,16 +89,15 @@ public class SpeedhackCheck {
|
|||||||
Location l = data.speedhackSetBackPoint;
|
Location l = data.speedhackSetBackPoint;
|
||||||
// If we have stored a location for the player, we put him back there
|
// If we have stored a location for the player, we put him back there
|
||||||
if(l != null) {
|
if(l != null) {
|
||||||
|
|
||||||
// Lets try it that way. Maybe now people don't "disappear" any longer
|
|
||||||
event.setFrom(l);
|
event.setFrom(l);
|
||||||
event.setTo(l);
|
event.setTo(l);
|
||||||
|
event.setCancelled(true);
|
||||||
event.getPlayer().teleportTo(l);
|
event.getPlayer().teleportTo(l);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Lets try it that way. Maybe now people don't "disappear" any longer
|
|
||||||
event.setFrom(event.getFrom());
|
event.setFrom(event.getFrom());
|
||||||
event.setTo(event.getFrom().clone());
|
event.setTo(event.getFrom().clone());
|
||||||
|
event.setCancelled(true);
|
||||||
event.getPlayer().teleportTo(event.getFrom());
|
event.getPlayer().teleportTo(event.getFrom());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user