Don't award negative gems to players in GH (PC-1688)

This commit is contained in:
ArcticZeroo 2017-10-23 10:32:40 -04:00 committed by Alexander Meech
parent 20fdae0a09
commit 817ffcd6c8
1 changed files with 2 additions and 1 deletions

View File

@ -82,7 +82,8 @@ public class EconomyModule extends MiniClientPlugin<Integer>
if (killer != null) if (killer != null)
{ {
Player killerPlayer = (Player) killer; Player killerPlayer = (Player) killer;
int newGems = (int) (oldGems * GEM_KILL_FACTOR); // Don't award the player negative gems, in the case of an overflow
int newGems = Math.min((int) (oldGems * GEM_KILL_FACTOR), 0);
addToStore(killerPlayer, "Killing " + F.name(player.getName()), newGems); addToStore(killerPlayer, "Killing " + F.name(player.getName()), newGems);
} }