diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java index f4f95e586..e8d600949 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java @@ -671,7 +671,7 @@ public class GadgetManager extends MiniPlugin } for (Gadget gadget : _gadgets.get(gadgetType)) { - gadget.disable(player); + gadget.disable(player, false); } } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/Gadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/Gadget.java index 136fd8093..90645d5bb 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/Gadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/Gadget.java @@ -123,13 +123,18 @@ public abstract class Gadget extends SalesPackageBase implements Listener } public void disable(Player player) + { + disable(player, true); + } + + public void disable(Player player, boolean message) { if (isActive(player)) { Manager.removeActive(player, this); GadgetDisableEvent event = new GadgetDisableEvent(player, this); Bukkit.getServer().getPluginManager().callEvent(event); - disableCustom(player); + disableCustom(player, message); } } @@ -143,7 +148,12 @@ public abstract class Gadget extends SalesPackageBase implements Listener public void disableCustom(Player player) { - if (_active.remove(player)) + disableCustom(player, true); + } + + public void disableCustom(Player player, boolean message) + { + if (_active.remove(player) && message) UtilPlayer.message(player, F.main("Gadget", "You disabled " + F.elem(getName()) + ".")); }