diff --git a/pom.xml b/pom.xml index 82cad5d7..05815e1f 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 cc.co.evenprime.bukkit NoCheat - 2.21 + 2.21a jar NoCheat diff --git a/src/cc/co/evenprime/bukkit/nocheat/checks/CheckUtil.java b/src/cc/co/evenprime/bukkit/nocheat/checks/CheckUtil.java index 8f2dc70d..7995f922 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/checks/CheckUtil.java +++ b/src/cc/co/evenprime/bukkit/nocheat/checks/CheckUtil.java @@ -137,9 +137,10 @@ public class CheckUtil { types[Material.WALL_SIGN.getId()] = NONSOLID; types[Material.SIGN_POST.getId()] = NONSOLID; - // doors can be solid or not + // (trap)doors can be solid or not types[Material.WOODEN_DOOR.getId()] = SOLID | NONSOLID; types[Material.IRON_DOOR_BLOCK.getId()] = SOLID | NONSOLID; + types[Material.TRAP_DOOR.getId()] = SOLID | NONSOLID; // pressure plates are so slim, you can consider them // nonsolid too @@ -149,14 +150,14 @@ public class CheckUtil { // Player can stand on and "in" lilipads types[Material.WATER_LILY.getId()] = SOLID | NONSOLID; - for(int i = 0; i < 256; i++) { + /*for(int i = 0; i < 256; i++) { if(Block.byId[i] != null) { - // System.out.println(Material.getMaterial(i) + - // (isSolid(types[i]) ? " solid " : "") + (isNonSolid(types[i]) - // ? " nonsolid " : "") + (isLiquid(types[i]) ? " liquid " : - // "")); + System.out.println(Material.getMaterial(i) + + (isSolid(types[i]) ? " solid " : "") + (isNonSolid(types[i]) + ? " nonsolid " : "") + (isLiquid(types[i]) ? " liquid " : + "")); } - } + }*/ } /** diff --git a/src/cc/co/evenprime/bukkit/nocheat/checks/moving/NoFallCheck.java b/src/cc/co/evenprime/bukkit/nocheat/checks/moving/NoFallCheck.java index 29b8f3b4..a66f525a 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/checks/moving/NoFallCheck.java +++ b/src/cc/co/evenprime/bukkit/nocheat/checks/moving/NoFallCheck.java @@ -28,12 +28,20 @@ public class NoFallCheck extends MovingCheck { */ public PreciseLocation check(NoCheatPlayer player, MovingData data, CCMoving cc) { + // If the player is serverside in creative mode, we have to stop here to + // avoid hurting him when he switches back to "normal" mode + if(player.isCreative()) { + data.fallDistance = 0F; + data.lastAddedFallDistance = 0F; + return null; + } + // This check is pretty much always a step behind for technical reasons. if(data.fromOnOrInGround) { // Start with zero fall distance data.fallDistance = 0F; } - + // If we increased fall height before for no good reason, reduce now by // the same amount if(player.getPlayer().getFallDistance() > data.lastAddedFallDistance) { diff --git a/src/cc/co/evenprime/bukkit/nocheat/config/Explainations.java b/src/cc/co/evenprime/bukkit/nocheat/config/Explainations.java index 95ec8ccc..5f8699a6 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/config/Explainations.java +++ b/src/cc/co/evenprime/bukkit/nocheat/config/Explainations.java @@ -77,7 +77,7 @@ public class Explainations { set(Configuration.BLOCKPLACE_DIRECTION_CHECK, "If true, check if a player is looking at the block that he's placing."); set(Configuration.BLOCKPLACE_DIRECTION_PRECISION, "Define how precise a player has to be when placing blocks. Lower values mean more precision, higher values less precision. Default 75."); set(Configuration.BLOCKPLACE_DIRECTION_PENALTYTIME, "Define how long after a failed attempt to place blocks a player will be disallowed to place another block. \nUnit is milliseconds, default is 100."); - set(Configuration.BLOCKPLACE_DIRECTION_ACTIONS, "What should be done if a player is placing blocks that are not in his line of sight.\nUnit is number of place(attempt)s outside the line of sight."); + set(Configuration.BLOCKPLACE_DIRECTION_ACTIONS, "What should be done if a player is placing blocks that are not in his line of sight.\nUnit is the combined distance in blocks between where the player looked vs. where the block was."); set(Configuration.CHAT_CHECK, "If true, do various checks on PlayerChat events.");