diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java index ee1cbb6eb..67a405655 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java @@ -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; + } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java index 4e6958443..bb568dc38 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java @@ -164,11 +164,28 @@ public class TreasurePage extends ShopPageBase 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); + } } }