From 0fff534cd1a7827bae0e70d599be8751bd6845b3 Mon Sep 17 00:00:00 2001 From: asofold Date: Fri, 15 Feb 2013 15:53:56 +0100 Subject: [PATCH] Allow stuck players to jump upwards if head is free. --- .../fr/neatmonster/nocheatplus/checks/moving/Passable.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Passable.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Passable.java index 694f5f97..8f2845c5 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Passable.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Passable.java @@ -66,6 +66,10 @@ public class Passable extends Check { else if (!from.isSameBlock(lbX, lbY, lbZ)){ // Otherwise keep loc as set-back. } + else if (to.isBlockAbove(from) && BlockProperties.isPassable(from.getBlockCache(), from.getX(), from.getY() + player.getEyeHeight(), from.getZ(), from.getTypeId(from.getBlockX(), Location.locToBlock(from.getY() + player.getEyeHeight()), from.getBlockZ()))){ + // Allow the move up if the head is free. + return null; + } else if (!from.isSameBlock(to)){ // Otherwise keep from as set-back. loc = null;