mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-29 03:48:50 +01:00
Fix bug related to beds and make flying/jumping check a bit more
precise.
This commit is contained in:
parent
c08e8f0edf
commit
5485f1e090
@ -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:
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user