diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/pvp/tnt/TNTGenPage.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/pvp/tnt/TNTGenPage.java index 367cc8464..efae5fd11 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/pvp/tnt/TNTGenPage.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/pvp/tnt/TNTGenPage.java @@ -84,7 +84,9 @@ public class TNTGenPage extends ShopPageBase nextTnt = UtilTime.MakeStr((TntGeneratorManager.SECONDS_PER_TNT - generator.getTicks()) * 1000); } - addButton(13, new ItemBuilder(Material.BREWING_STAND_ITEM) + if (clan.getMembers().containsKey(generator.getBuyer())) + { + addButton(13, new ItemBuilder(Material.BREWING_STAND_ITEM) .setTitle(C.cGreen + "TNT Generator") .setLore( " ", @@ -95,7 +97,24 @@ public class TNTGenPage extends ShopPageBase C.cWhite + "Next TNT: " + F.elem(nextTnt)).build(), (player, click) -> { clearPage(); buildPage(); - }); + } + ); + } + else + { + addButton(13, new ItemBuilder(Material.BREWING_STAND_ITEM) + .setTitle(C.cGreen + "TNT Generator") + .setLore( + " ", + C.cWhite + "TNT Available: " + F.elem(Integer.valueOf(generator.getStock())), + " ", + C.cWhite + "Next TNT: " + F.elem(nextTnt)).build(), (player, click) -> + { + clearPage(); + buildPage(); + } + ); + } if (generator.getStock() == 0) { @@ -138,5 +157,4 @@ public class TNTGenPage extends ShopPageBase } } } - -} +} \ No newline at end of file