diff --git a/src/com/massivecraft/massivecore/chestgui/ChestGui.java b/src/com/massivecraft/massivecore/chestgui/ChestGui.java index 83dd441d..0759572b 100644 --- a/src/com/massivecraft/massivecore/chestgui/ChestGui.java +++ b/src/com/massivecraft/massivecore/chestgui/ChestGui.java @@ -151,6 +151,14 @@ public class ChestGui public boolean isAutoremoving() { return this.autoremoving; } public void setAutoremoving(boolean autoremoving) { this.autoremoving = autoremoving; } + // -------------------------------------------- // + // ALLOWBOTTOMINVENTORY + // -------------------------------------------- // + + private boolean allowBottomInventory = false; + public boolean isBottomInventoryAllowed() { return this.allowBottomInventory; } + public void setBottomInventoryAllow(boolean allowBottomInventory) { this.allowBottomInventory = allowBottomInventory; } + // -------------------------------------------- // // CONSTRUCT // -------------------------------------------- // diff --git a/src/com/massivecraft/massivecore/engine/EngineMassiveCoreChestGui.java b/src/com/massivecraft/massivecore/engine/EngineMassiveCoreChestGui.java index 385ea65b..3cf741c0 100644 --- a/src/com/massivecraft/massivecore/engine/EngineMassiveCoreChestGui.java +++ b/src/com/massivecraft/massivecore/engine/EngineMassiveCoreChestGui.java @@ -49,7 +49,17 @@ public class EngineMassiveCoreChestGui extends Engine // ... warn on bottom inventory ... if (InventoryUtil.isBottomInventory(event)) { - MixinMessage.get().msgOne(event.getWhoClicked(), "Exit the GUI to edit your items."); + // ... only if its not allowed. + if (gui.isBottomInventoryAllowed()) + { + event.setCancelled(false); + event.setResult(Result.DEFAULT); + } + else + { + MixinMessage.get().msgOne(event.getWhoClicked(), "Exit the GUI to edit your items."); + } + return; }