From 3be811e480bb6a6743f12655fa93e10c17314b90 Mon Sep 17 00:00:00 2001 From: Sarah Date: Mon, 10 Aug 2015 17:08:03 +0200 Subject: [PATCH] Fixing Spinner announcements. --- .../src/mineplex/core/bonuses/gui/SpinGui.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java index e9d7221bb..16c8fcba3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java @@ -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; }