From c9468cd861c29ca8f7b33562557c0af14b7d10f0 Mon Sep 17 00:00:00 2001 From: asofold Date: Sat, 30 May 2015 23:46:16 +0200 Subject: [PATCH] Log tags, if updated after violation handling. --- .../nocheatplus/checks/moving/SurvivalFly.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java index 838c573c..d1ff9bef 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java @@ -398,8 +398,12 @@ public class SurvivalFly extends Check { // TODO: on ground -> on ground improvements // Debug output. + final int tagsLength; if (data.debug) { outputDebug(player, to, data, cc, hDistance, hAllowedDistance, hFreedom, yDistance, vAllowedDistance, fromOnGround, resetFrom, toOnGround, resetTo); + tagsLength = tags.size(); + } else { + tagsLength = 0; // JIT vs. IDE. } // Handle violations. @@ -533,6 +537,9 @@ public class SurvivalFly extends Check { data.fromWasReset = resetFrom || data.noFallAssumeGround; data.lastFrictionHorizontal = data.nextFrictionHorizontal; data.lastFrictionVertical = data.nextFrictionVertical; + if (data.debug && tags.size() > tagsLength) { + logPostViolationTags(player); + } return null; } @@ -1540,4 +1547,8 @@ public class SurvivalFly extends Check { NCPAPIProvider.getNoCheatPlusAPI().getLogManager().debug(Streams.TRACE_FILE, builder.toString()); } + private void logPostViolationTags(final Player player) { + NCPAPIProvider.getNoCheatPlusAPI().getLogManager().debug(Streams.TRACE_FILE, player.getName() + " SurvivalFly Post violation handling tag update:\n" + StringUtil.join(tags, "+")); + } + }