Fixing Spinner announcements.

This commit is contained in:
Sarah 2015-08-10 17:08:03 +02:00
parent ed7b8949bb
commit 3be811e480

View File

@ -253,9 +253,24 @@ public class SpinGui extends SimpleGui
return;
_manager.addPendingExplosion(getPlayer(), _reward);
if (_reward.getRarity() == RewardRarity.RARE)
{
Bukkit.broadcastMessage(F.main("Treasure", F.name(getPlayer().getName()) + " won " + C.cPurple + "Rare " + _rewardData.getFriendlyName() + C.cGray + " from Carl's Spinner."));
}
else if (_reward.getRarity() == RewardRarity.LEGENDARY)
{
Bukkit.broadcastMessage(F.main("Treasure", F.name(getPlayer().getName()) + " won " + C.cGreen + "Legendary " + _rewardData.getFriendlyName() + C.cGray + " from Carl's Spinner."));
}
else if (_reward.getRarity() == RewardRarity.MYTHICAL)
{
Bukkit.broadcastMessage(F.main("Treasure", F.name(getPlayer().getName()) + " won " + C.cRed + "Mythical " + _rewardData.getFriendlyName() + C.cGray + " from Carl's Spinner."));
}
else
{
UtilPlayer.message(getPlayer(), F.main("Carl's Spinner", "You won " + _rewardData.getRarity().getColor() + _rewardData.getFriendlyName() + C.cGray + " from Carl's Spinner."));
}
ItemStack item = getInventory().getItem(13);
getInventory().setItem(13, ItemStackFactory.Instance.CreateStack(item.getType(), (byte) 0, 1, _rewardData.getFriendlyName()));
UtilPlayer.message(getPlayer(), F.main("Carl's Spinner", "You got " + _rewardData.getRarity().getColor() + _rewardData.getFriendlyName() + C.cGray + " From Carl's Spinner."));
_rewarded = true;
}