diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java index 7d5b830fe..d41da36a3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java @@ -154,15 +154,22 @@ public class CosmeticManager extends MiniPlugin _gadgetManager.setActiveItemSlot(i-1); } - public void setActive(boolean b) + public void setActive(boolean showInterface) { - _showInterface = b; - - if (!b) + _showInterface = showInterface; + + if (!showInterface) + { for (Player player : UtilServer.getPlayers()) - player.getOpenInventory().close(); + { + if (player.getOpenInventory().getTopInventory().getHolder() != player) + { + player.closeInventory(); + } + } + } } - + public void disableItemsForGame() { _gadgetManager.DisableAll();