Fix another outdated config.txt entry, fix nofall check dealing damage

to players that switch from "creative" to normal, fix players being
unable to climb out of trapdoors with ladders.
This commit is contained in:
Evenprime 2011-12-14 23:57:26 +01:00
parent 7477180de8
commit 614db88d54
4 changed files with 19 additions and 10 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>cc.co.evenprime.bukkit</groupId>
<artifactId>NoCheat</artifactId>
<version>2.21</version>
<version>2.21a</version>
<packaging>jar</packaging>
<name>NoCheat</name>
<properties>

View File

@ -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 " :
""));
}
}
}*/
}
/**

View File

@ -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) {

View File

@ -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.");