Fix disabling not removing chicken and add description
This commit is contained in:
parent
49d738dd98
commit
e9c2346814
@ -13,6 +13,7 @@ import org.bukkit.potion.PotionEffectType;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
@ -32,10 +33,15 @@ public class ItemMaryPoppins extends ItemGadget
|
||||
|
||||
public ItemMaryPoppins(GadgetManager manager)
|
||||
{
|
||||
super(manager, "Umbrella", new String[]
|
||||
super(manager, "Nanny's Umbrella", new String[]
|
||||
{
|
||||
|
||||
C.cGray + "It's Supercarlshardilicouscakewarsaloucous",
|
||||
C.cGray + "even though the sound",
|
||||
C.cGray + "of it is something quite",
|
||||
C.cGray + "atrocious."
|
||||
}, CostConstants.POWERPLAY_BONUS, Material.STICK, (byte) 0, TimeUnit.SECONDS.toMillis(20), null);
|
||||
|
||||
Free = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -85,7 +91,7 @@ public class ItemMaryPoppins extends ItemGadget
|
||||
displayUmbrella(location.add(UtilAlg.getRight(location.getDirection()).multiply(0.5)));
|
||||
}
|
||||
|
||||
if (chicken.getPassenger() == null || UtilEnt.isGrounded(chicken))
|
||||
if (!chicken.isValid() || chicken.getPassenger() == null || UtilEnt.isGrounded(chicken))
|
||||
{
|
||||
chicken.eject();
|
||||
chicken.remove();
|
||||
@ -97,6 +103,17 @@ public class ItemMaryPoppins extends ItemGadget
|
||||
}, 20, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
super.disableCustom(player, message);
|
||||
|
||||
if (player.getVehicle() != null)
|
||||
{
|
||||
player.getVehicle().remove();
|
||||
}
|
||||
}
|
||||
|
||||
private void displayUmbrella(Location location)
|
||||
{
|
||||
for (double y = 0; y < 1.5; y += 0.1)
|
||||
|
@ -48,7 +48,7 @@ public class PowerPlayClubRewards
|
||||
.put(YearMonth.of(2018, Month.JANUARY), new UnknownSalesPackageItem("Mob Bomb"))
|
||||
.put(YearMonth.of(2018, Month.FEBRUARY), new UnknownSalesPackageItem("Play Catch"))
|
||||
.put(YearMonth.of(2018, Month.MARCH), new UnknownSalesPackageItem("Connect 4"))
|
||||
.put(YearMonth.of(2018, Month.APRIL), new UnknownSalesPackageItem("Umbrella"))
|
||||
.put(YearMonth.of(2018, Month.APRIL), new UnknownSalesPackageItem("Nanny's Umbrella"))
|
||||
.build();
|
||||
|
||||
public interface PowerPlayClubItem
|
||||
|
Loading…
Reference in New Issue
Block a user