From 8cecf230df8d1e71dd533bfc1056dd399861aef2 Mon Sep 17 00:00:00 2001 From: asofold Date: Sun, 29 Nov 2015 09:06:27 +0100 Subject: [PATCH] Legacy compat: Use BridgeHealth for health. --- .../java/fr/neatmonster/nocheatplus/checks/ViolationData.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/ViolationData.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/ViolationData.java index cb8cd0b2..3c4f9a9f 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/ViolationData.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/ViolationData.java @@ -11,6 +11,7 @@ import fr.neatmonster.nocheatplus.actions.ActionList; import fr.neatmonster.nocheatplus.actions.ParameterName; import fr.neatmonster.nocheatplus.actions.types.CancelAction; import fr.neatmonster.nocheatplus.checks.access.IViolationInfo; +import fr.neatmonster.nocheatplus.compat.BridgeHealth; import fr.neatmonster.nocheatplus.logging.StaticLog; /** @@ -138,7 +139,7 @@ public class ViolationData implements IViolationInfo, ActionData { return check.getClass().getSimpleName(); case HEALTH: { String health = getParameterValue(ParameterName.HEALTH); - return health == null ? (player.getHealth() + "/" + player.getMaxHealth()) : health; + return health == null ? (BridgeHealth.getHealth(player) + "/" + BridgeHealth.getMaxHealth(player)) : health; } case IP: return player.getAddress().toString().substring(1).split(":")[0];