From d9cb1bf3374373469c11c6bea16079c001b48c7c Mon Sep 17 00:00:00 2001 From: Zrips Date: Thu, 25 Jan 2024 14:21:25 +0200 Subject: [PATCH] Fix for payment for mob killing going throw when it should not --- .../com/gamingmesh/jobs/listeners/JobsPaymentListener.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java index b566735a..74f7fd9e 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java @@ -1326,7 +1326,6 @@ public final class JobsPaymentListener implements Listener { } if (Jobs.getGCManager().MonsterDamageUse) { - boolean ignore = false; if (Jobs.getGCManager().MonsterDamageIgnoreBosses) { CMIEntityType etype = CMIEntityType.getByType(lVictim.getType()); @@ -1342,14 +1341,13 @@ public final class JobsPaymentListener implements Listener { if (!ignore) { UUID lVictimUUID = lVictim.getUniqueId(); Double damage = damageDealtByPlayers.getIfPresent(lVictimUUID); - if (damage != null) { double perc = (damage * 100D) / Util.getMaxHealth(lVictim); - damageDealtByPlayers.invalidate(lVictimUUID); - if (perc < Jobs.getGCManager().MonsterDamagePercentage) return; + } else { + return; } } }