Fix bug related to beds and make flying/jumping check a bit more

precise.
This commit is contained in:
Evenprime 2011-08-08 18:25:19 +02:00
parent c08e8f0edf
commit 5485f1e090
3 changed files with 8 additions and 8 deletions

View File

@ -3,7 +3,7 @@ name: NoCheat
author: Evenprime
main: cc.co.evenprime.bukkit.nocheat.NoCheat
version: 1.11b
version: 1.11c
softdepend: [ Permissions, CraftIRC ]
@ -17,6 +17,11 @@ commands:
Example: /<command> -p [player] | Get permissions of the player, * = check disabled globally
permissions:
nocheat.*:
description: Allow the player to do everything (and get log messages)
children:
nocheat.all: true
nocheat.notify: true
nocheat.all:
description: Allow the player to do everything (except for getting log messages)
children:

View File

@ -47,7 +47,7 @@ public class FlyingCheck {
// Walk or start Jump
if(fromOnGround)
{
distanceAboveLimit = toY - fromY - limit;
distanceAboveLimit = toY - Math.floor(fromY) - limit;
}
// Land or Fly/Fall
else
@ -65,7 +65,7 @@ public class FlyingCheck {
if(toOnGround) limit += stepHeight;
distanceAboveLimit = toY - l.getY() - limit;
distanceAboveLimit = toY - Math.floor(l.getY()) - limit;
// Always give some bonus points in case of identical Y values in midair (hovering player)
if(fromY == toY && !toOnGround) {

View File

@ -204,11 +204,6 @@ public class MovingCheck extends Check {
}
}
// If the target is a bed, don't check (going to bed is a kind of mini teleport...)
if(to.getWorld().getBlockTypeIdAt(to) == Material.BED_BLOCK.getId()) {
return false;
}
return true;
}