Re-Activated chest buttons
This commit is contained in:
parent
d92ad9c53f
commit
816a7ca232
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user