Allows multiple balloons

This commit is contained in:
LCastr0 2016-12-26 22:19:08 -02:00
parent 5e420a20d8
commit 78510ffbbf
2 changed files with 6 additions and 2 deletions

View File

@ -31,7 +31,7 @@ public class BalloonsPage extends GadgetPage
{
addGadget(gadget, slot);
if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.BALLOON) == gadget)
if (gadget.isActive(getPlayer()))
addGlow(slot);
slot++;

View File

@ -53,8 +53,12 @@ public abstract class BalloonGadget extends Gadget
@Override
public void disableCustom(Player player, boolean message)
{
if (!_active.remove(player))
return;
removePlayerBalloon(player);
UtilPlayer.message(player, F.main("Gadget", "You despawned a " + F.elem(getName())) + "!");
if (message)
UtilPlayer.message(player, F.main("Gadget", "You despawned a " + F.elem(getName())) + "!");
}
private boolean addPlayerBalloon(Player player)