Fixed spring chests being purchasable even if locked or if player had all the items
This commit is contained in:
parent
957004f97a
commit
424e0fe0a4
@ -83,6 +83,19 @@ public class BuyChestButton implements IButton
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (_chestType == TreasureType.SPRING)
|
||||
{
|
||||
if (!new File("../../update/files/EnableSpringChest.dat").exists())
|
||||
{
|
||||
player.sendMessage(F.main("Treasure", "That chest is no longer available for purchase!"));
|
||||
return;
|
||||
}
|
||||
if (!_page.getPlugin().hasItemsToGivePlayer(_chestType.getRewardPool(), player))
|
||||
{
|
||||
player.sendMessage(F.main("Treasure", "You seem to have all treasures for this chest unlocked already!"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (_chestType == TreasureType.FREEDOM || _chestType == TreasureType.HAUNTED)
|
||||
{
|
||||
if (!_page.getPlugin().hasItemsToGivePlayer(_chestType.getRewardPool(), player))
|
||||
|
Loading…
Reference in New Issue
Block a user