Skip to content

Commit

Permalink
- fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Grzybol committed Jun 26, 2024
1 parent 5da9b0b commit 75b0175
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/betterbox/mine/game/betterelo/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -1191,8 +1191,11 @@ public void customEntityDamageEvent(EntityDamageByEntityEvent event){
defense=0;
}
}
double finalDamage =((totalDamage-armor)*(1-(0.01*defense)));
if(finalDamage<=0)
finalDamage=0;

event.setDamage((totalDamage-armor)*(1-(0.01*defense)));
event.setDamage(finalDamage);
pluginLogger.log(PluginLogger.LogLevel.CUSTOM_MOBS, "Event.customEntityDamageEvent totalDamage: " + totalDamage+", bonusDamage: "+bonusDamage);
return;

Expand Down

0 comments on commit 75b0175

Please sign in to comment.