Merge branch 'project-cosmetics' into develop
This commit is contained in:
commit
4343fa3512
@ -671,7 +671,7 @@ public class GadgetManager extends MiniPlugin
|
||||
}
|
||||
for (Gadget gadget : _gadgets.get(gadgetType))
|
||||
{
|
||||
gadget.disable(player);
|
||||
gadget.disable(player, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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()) + "."));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user