From 74435bac12f2bf946be10b41daaaec34cc54e019 Mon Sep 17 00:00:00 2001 From: Chiss Date: Thu, 14 Aug 2014 17:31:14 +1000 Subject: [PATCH] fixed bug where players kept inventory open, to be able to enable morphs ingame. --- .../src/mineplex/core/cosmetic/CosmeticManager.java | 5 +++++ .../src/nautilus/game/arcade/ArcadeManager.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java index 8b5b8af27..ffae2320d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java @@ -16,6 +16,7 @@ import mineplex.core.account.CoreClientManager; import mineplex.core.common.util.C; import mineplex.core.common.util.UtilGear; import mineplex.core.common.util.UtilInv; +import mineplex.core.common.util.UtilServer; import mineplex.core.cosmetic.ui.CosmeticShop; import mineplex.core.donation.DonationManager; import mineplex.core.gadget.GadgetManager; @@ -154,6 +155,10 @@ public class CosmeticManager extends MiniPlugin public void setActive(boolean b) { _showInterface = b; + + if (!b) + for (Player player : UtilServer.getPlayers()) + player.getOpenInventory().close(); } public void disableItemsForGame() diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java index e4e677b9a..638f3a500 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -835,7 +835,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation if (getCosmeticManager().isShowingInterface()) { getCosmeticManager().setActive(false); - getCosmeticManager().disableItemsForGame(); + getCosmeticManager().disableItemsForGame(); } } }