mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-28 11:28:11 +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
|
author: Evenprime
|
||||||
|
|
||||||
main: cc.co.evenprime.bukkit.nocheat.NoCheatPlugin
|
main: cc.co.evenprime.bukkit.nocheat.NoCheatPlugin
|
||||||
version: 0.5.6
|
version: 0.5.7
|
||||||
|
|
||||||
|
@ -155,6 +155,11 @@ public class MovingCheck {
|
|||||||
vl = vl > MINOR ? vl : MINOR;
|
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
|
// pre-calculate boundary values that are needed multiple times in the following checks
|
||||||
// the array each contains [lowerX, higherX, Y, lowerZ, higherZ]
|
// the array each contains [lowerX, higherX, Y, lowerZ, higherZ]
|
||||||
|
@ -80,7 +80,7 @@ public class NoCheatConfiguration {
|
|||||||
|
|
||||||
if(fh == null) {
|
if(fh == null) {
|
||||||
try {
|
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.setLevel(stringToLevel(c.getString("logging.logtofile")));
|
||||||
fh.setFormatter(Logger.getLogger("Minecraft").getHandlers()[0].getFormatter());
|
fh.setFormatter(Logger.getLogger("Minecraft").getHandlers()[0].getFormatter());
|
||||||
logger.addHandler(fh);
|
logger.addHandler(fh);
|
||||||
|
Loading…
Reference in New Issue
Block a user