Re-Activated chest buttons
This commit is contained in:
parent
d92ad9c53f
commit
816a7ca232
@ -127,10 +127,14 @@ public class TreasureLocation implements Listener
|
|||||||
player.sendMessage(F.main("Treasure", "You don't have any chests to open!"));
|
player.sendMessage(F.main("Treasure", "You don't have any chests to open!"));
|
||||||
|
|
||||||
if (testServer)
|
if (testServer)
|
||||||
|
{
|
||||||
player.sendMessage("But like, lets just ignore that for now though ;)");
|
player.sendMessage("But like, lets just ignore that for now though ;)");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (isTreasureInProgress())
|
if (isTreasureInProgress())
|
||||||
|
@ -164,11 +164,28 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
|||||||
|
|
||||||
private void addChest(int slot, ItemStack item, TreasureType treasureType, int owned)
|
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));
|
addButton(slot, item, new OpenTreasureButton(getPlayer(), _treasureLocation, treasureType));
|
||||||
// else if (treasureType.isPurchasable())
|
return;
|
||||||
// addButton(slot, item, new BuyChestButton(getPlayer(), _inventoryManager, this, treasureType.getItemName(), Material.CHEST, treasureType.getPurchasePrice()));
|
}
|
||||||
// else
|
|
||||||
// setItem(slot, item);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user