Separate out Haunted Chest purchase condition
This commit is contained in:
parent
cd110ddef9
commit
5a4fab5fc0
@ -109,7 +109,20 @@ public class BuyChestButton implements IButton
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (_chestType == TreasureType.FREEDOM || _chestType == TreasureType.HAUNTED)
|
||||
if (_chestType == TreasureType.HAUNTED)
|
||||
{
|
||||
if (!new File("../../update/files/EnableHauntedChest.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)
|
||||
{
|
||||
if (!new File("../../update/files/EnableFreedomChest.dat").exists())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user