Skip to content

Commit ee2a56d

Browse files
committed
fix arithmeticexception
1 parent 61cb3ba commit ee2a56d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/online/monkegame/monkemodmail/utils/SuspicionLevel.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ public String checkSuspicion(String uuid, Player p) {
4747
}
4848

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

0 commit comments

Comments
 (0)