Stops players from purchasing the chest

This commit is contained in:
LCastr0 2017-01-17 20:20:17 -02:00
parent 76b356f73c
commit 27aa682727
2 changed files with 8 additions and 1 deletions

View File

@ -65,6 +65,14 @@ public class BuyChestButton implements IButton
return;
}
}
if (_chestType == TreasureType.GINGERBREAD)
{
if (!new File("../../update/files/EnableThankful.dat").exists())
{
player.sendMessage(F.main("Treasure", "That chest is no longer available for purchase!"));
return;
}
}
if (_chestType == TreasureType.FREEDOM || _chestType == TreasureType.HAUNTED)
{
if (!_page.getPlugin().hasItemsToGivePlayer(_chestType.getRewardPool(), player))

View File

@ -1,6 +1,5 @@
package mineplex.core.treasure.gui;
import java.io.File;
import java.util.ArrayList;
import java.util.List;