Re-Activated chest buttons

This commit is contained in:
xGamingDudex 2016-05-16 01:57:58 +02:00
parent d92ad9c53f
commit 816a7ca232
2 changed files with 26 additions and 5 deletions

View File

@ -127,9 +127,13 @@ public class TreasureLocation implements Listener
player.sendMessage(F.main("Treasure", "You don't have any chests to open!"));
if (testServer)
{
player.sendMessage("But like, lets just ignore that for now though ;)");
}
else
{
return;
}
}

View File

@ -164,11 +164,28 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
private void addChest(int slot, ItemStack item, TreasureType treasureType, int owned)
{
// if (owned > 0)
boolean testServer = getPlugin().getPlugin().getConfig().getString("serverstatus.group").equalsIgnoreCase("Testing");
// COIN TEST PURPOSES, WHEN RELEASED, COMMENT THIS LINE!
testServer = false;
// COIN TEST PURPOSES, WHEN RELEASED, COMMENT THIS LINE!
if(testServer)
{
addButton(slot, item, new OpenTreasureButton(getPlayer(), _treasureLocation, treasureType));
return;
}
if (owned > 0)
{
addButton(slot, item, new OpenTreasureButton(getPlayer(), _treasureLocation, treasureType));
// else if (treasureType.isPurchasable())
// addButton(slot, item, new BuyChestButton(getPlayer(), _inventoryManager, this, treasureType.getItemName(), Material.CHEST, treasureType.getPurchasePrice()));
// else
// setItem(slot, item);
}
else if (treasureType.isPurchasable())
{
addButton(slot, item, new BuyChestButton(getPlayer(), _inventoryManager, this, treasureType.getItemName(), Material.CHEST, treasureType.getPurchasePrice()));
}
else
{
setItem(slot, item);
}
}
}