Fix double hologram and hopefully NPE

This commit is contained in:
Shaun Bennett 2015-08-14 21:14:34 -05:00
parent c520bd7921
commit 1eaa6446af
2 changed files with 6 additions and 4 deletions

View File

@ -278,7 +278,7 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
return _voteStreak;
}
public void handleVote(final Player player, final int gemsRecieved)
public void handleVote(final Player player, final int gemsReceived)
{
final int accountId = _clientManager.getAccountId(player);
@ -297,11 +297,14 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
@Override
public void run()
{
BonusClientData oldData = Get(player);
if (oldData != null) data.setHologram(oldData.getHologram());
Set(player, data);
_statsManager.incrementStat(player, "Global.DailyVote", 1);
addPendingExplosion(player, player.getName());
UtilPlayer.message(player, F.main("Carl", "Thanks for voting for Mineplex!"));
UtilPlayer.message(player, F.main("Carl", "You received " + F.elem(gemsRecieved + " Gems") + " and " + F.elem("1 Carl Spinner Ticket") + "!"));
UtilPlayer.message(player, F.main("Carl", "You received " + F.elem(gemsReceived + " Gems") + " and " + F.elem("1 Carl Spinner Ticket") + "!"));
}
});
}

View File

@ -532,8 +532,6 @@ public class Hologram
if (newText.equals(_hologramText))
return this;
_makeSpawnPackets = true;
if (isInUse())
{
int[] destroy1_7 = new int[0];
@ -632,6 +630,7 @@ public class Hologram
}
_hologramText = newText;
makeSpawnPackets();
return this;
}