Made it where the Delivery Man normal rewards are shown as coal skulls if the reward can't be claimed.

This commit is contained in:
nickreesdev 2021-02-19 20:02:10 -06:00
parent 202fdafe81
commit 4668206fc5

@ -56,8 +56,7 @@ public class DeliveryManMenu extends UpdatableMenu {
for (DeliveryManReward reward : DeliveryManReward.values()) { for (DeliveryManReward reward : DeliveryManReward.values()) {
boolean canClaim = (deliveryManManager.canClaim(player, reward) && optionalAccount.get().hasRank(reward.getRequiredRank())); boolean canClaim = (deliveryManManager.canClaim(player, reward) && optionalAccount.get().hasRank(reward.getRequiredRank()));
ItemBuilder itemBuilder = new ItemBuilder(XMaterial.PLAYER_HEAD) ItemBuilder itemBuilder = new ItemBuilder(XMaterial.PLAYER_HEAD)
.setSkullOwner(reward.getRewardPackage().getIconTexture(player, optionalAccount.get())) .setSkullOwner((canClaim ? reward.getRewardPackage().getIconTexture(player, optionalAccount.get()) : SkullTexture.COAL_BLOCK))
.setGlow(canClaim)
.setName((canClaim ? "§a" : "§c") + "§l" + reward.getDisplayName()) .setName((canClaim ? "§a" : "§c") + "§l" + reward.getDisplayName())
.addLoreLine("§7Claimable: " + (canClaim ? "§aYes" : "§cNo")); .addLoreLine("§7Claimable: " + (canClaim ? "§aYes" : "§cNo"));
if (reward == DeliveryManReward.MONTHLY) { if (reward == DeliveryManReward.MONTHLY) {