Skip to content

Commit

Permalink
fix arithmeticexception
Browse files Browse the repository at this point in the history
  • Loading branch information
boonsboos committed Oct 30, 2021
1 parent 61cb3ba commit ee2a56d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public String checkSuspicion(String uuid, Player p) {
}

//this bit does the magic calculation stuff
if (size == 0 || values == 0 ) {
return "Distrust too low to make a judgement!";
}
float averageReport = (values) / size;
int playtime = p.getPlayer().getStatistic(Statistic.PLAY_ONE_MINUTE) / 7200;
output = (Float)((float)(averageReport * (reports * 0.37f) - Math.pow(0.01 * playtime, 1.12)+1));
Expand Down

0 comments on commit ee2a56d

Please sign in to comment.