Fix double hologram and hopefully NPE
This commit is contained in:
parent
c520bd7921
commit
1eaa6446af
@ -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") + "!"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user