File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
src/main/java/com/github/elic0de/thejpspit/util Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ private double calculateKillingRatio(PitPlayer player) {
2727 long deaths = player .getDeaths ();
2828 long kills = player .getKills ();
2929 long total = deaths + kills ;
30+ if (deaths == 0 ) deaths ++;
3031 if (deaths >= 0 && kills >= 0 && total > 0 ) {
3132 return round ((double ) kills / deaths * roundingFactor ) / roundingFactor ;
3233 } else {
@@ -38,6 +39,7 @@ private double calculateKillingRatio(OfflinePitPlayer player) {
3839 long deaths = player .getDeaths ();
3940 long kills = player .getKills ();
4041 long total = deaths + kills ;
42+ if (deaths == 0 ) deaths ++;
4143 if (deaths >= 0 && kills >= 0 && total > 0 ) {
4244 return round ((double ) kills / deaths * roundingFactor ) / roundingFactor ;
4345 } else {
You can’t perform that action at this time.
0 commit comments