mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-27 02:48:04 +01:00
Fixed wrong violation when "teleporting" into a bed
This commit is contained in:
parent
80aa08d279
commit
8ea62ae52a
@ -3,5 +3,5 @@ name: NoCheatPlugin
|
||||
author: Evenprime
|
||||
|
||||
main: cc.co.evenprime.bukkit.nocheat.NoCheatPlugin
|
||||
version: 0.5.6
|
||||
version: 0.5.7
|
||||
|
||||
|
@ -154,6 +154,11 @@ public class MovingCheck {
|
||||
else if(xDistance > NoCheatConfiguration.movingDistanceLow || zDistance > NoCheatConfiguration.movingDistanceLow) {
|
||||
vl = vl > MINOR ? vl : MINOR;
|
||||
}
|
||||
|
||||
// If the target is a bed, allow it
|
||||
if(to.getWorld().getBlockTypeIdAt(to) == Material.BED_BLOCK.getId() && vl <= NORMAL) {
|
||||
return; // players are allowed to "teleport" into a bed over short distances
|
||||
}
|
||||
|
||||
|
||||
// pre-calculate boundary values that are needed multiple times in the following checks
|
||||
|
@ -80,7 +80,7 @@ public class NoCheatConfiguration {
|
||||
|
||||
if(fh == null) {
|
||||
try {
|
||||
fh = new FileHandler(c.getString("logging.filename"), 2000, 2, true);
|
||||
fh = new FileHandler(c.getString("logging.filename"), true);
|
||||
fh.setLevel(stringToLevel(c.getString("logging.logtofile")));
|
||||
fh.setFormatter(Logger.getLogger("Minecraft").getHandlers()[0].getFormatter());
|
||||
logger.addHandler(fh);
|
||||
|
Loading…
Reference in New Issue
Block a user