mirror of
https://github.com/Zrips/Jobs.git
synced 2024-12-30 21:07:48 +01:00
Fix for payment for mob killing going throw when it should not
This commit is contained in:
parent
255a1c31a0
commit
d9cb1bf337
@ -1326,7 +1326,6 @@ public final class JobsPaymentListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Jobs.getGCManager().MonsterDamageUse) {
|
if (Jobs.getGCManager().MonsterDamageUse) {
|
||||||
|
|
||||||
boolean ignore = false;
|
boolean ignore = false;
|
||||||
if (Jobs.getGCManager().MonsterDamageIgnoreBosses) {
|
if (Jobs.getGCManager().MonsterDamageIgnoreBosses) {
|
||||||
CMIEntityType etype = CMIEntityType.getByType(lVictim.getType());
|
CMIEntityType etype = CMIEntityType.getByType(lVictim.getType());
|
||||||
@ -1342,14 +1341,13 @@ public final class JobsPaymentListener implements Listener {
|
|||||||
if (!ignore) {
|
if (!ignore) {
|
||||||
UUID lVictimUUID = lVictim.getUniqueId();
|
UUID lVictimUUID = lVictim.getUniqueId();
|
||||||
Double damage = damageDealtByPlayers.getIfPresent(lVictimUUID);
|
Double damage = damageDealtByPlayers.getIfPresent(lVictimUUID);
|
||||||
|
|
||||||
if (damage != null) {
|
if (damage != null) {
|
||||||
double perc = (damage * 100D) / Util.getMaxHealth(lVictim);
|
double perc = (damage * 100D) / Util.getMaxHealth(lVictim);
|
||||||
|
|
||||||
damageDealtByPlayers.invalidate(lVictimUUID);
|
damageDealtByPlayers.invalidate(lVictimUUID);
|
||||||
|
|
||||||
if (perc < Jobs.getGCManager().MonsterDamagePercentage)
|
if (perc < Jobs.getGCManager().MonsterDamagePercentage)
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user