Better message when despawning balloons

This commit is contained in:
LCastr0 2017-01-13 23:32:51 -02:00 committed by cnr
parent 0d1f3a0613
commit d7fe81184a
2 changed files with 6 additions and 2 deletions

View File

@ -148,8 +148,9 @@ public abstract class BalloonGadget extends Gadget
{
for (BalloonGadget balloonGadget : Manager.getActiveBalloons(event.getPlayer()))
{
balloonGadget.disable(event.getPlayer());
balloonGadget.disable(event.getPlayer(), false);
}
UtilPlayer.message(event.getPlayer(), F.main("Balloons", "Your balloons popped when you fell into the void! Equip them again!"));
}
}
}

View File

@ -8,8 +8,10 @@ import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
import mineplex.core.Managers;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.BalloonGadget;
@ -78,12 +80,13 @@ public class BalloonData
{
for (BalloonGadget balloonGadget : Managers.get(GadgetManager.class).getActiveBalloons(_player))
{
balloonGadget.disable(_player);
balloonGadget.disable(_player, false);
}
}
}
}
}
UtilPlayer.message(_player, F.main("Balloons", "Your balloons popped when you walked near lava! Equip them again!"));
//Update Target
if (UtilMath.offset(_player.getEyeLocation(), _target) > 3 || UtilMath.offset(_balloonLoc, _target) < 1)