PC-368
This commit is contained in:
parent
953a87b3ea
commit
26d3a77748
@ -11,6 +11,8 @@ import org.bukkit.entity.Chicken;
|
|||||||
import org.bukkit.entity.EnderDragon;
|
import org.bukkit.entity.EnderDragon;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.potion.PotionEffect;
|
||||||
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilAlg;
|
import mineplex.core.common.util.UtilAlg;
|
||||||
@ -29,7 +31,7 @@ public class DragonData extends MountData
|
|||||||
public float Pitch = 0;
|
public float Pitch = 0;
|
||||||
public Vector Velocity = new Vector(0,0,0);
|
public Vector Velocity = new Vector(0,0,0);
|
||||||
|
|
||||||
public Entity Chicken;
|
public Chicken Chicken;
|
||||||
|
|
||||||
public DragonData(DragonMount dragonMount, Player rider)
|
public DragonData(DragonMount dragonMount, Player rider)
|
||||||
{
|
{
|
||||||
@ -50,6 +52,7 @@ public class DragonData extends MountData
|
|||||||
rider.getWorld().playSound(rider.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
rider.getWorld().playSound(rider.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
||||||
|
|
||||||
Chicken = rider.getWorld().spawn(rider.getLocation(), Chicken.class);
|
Chicken = rider.getWorld().spawn(rider.getLocation(), Chicken.class);
|
||||||
|
Chicken.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 99999999, 1));
|
||||||
Dragon.setPassenger(Chicken);
|
Dragon.setPassenger(Chicken);
|
||||||
|
|
||||||
Chicken.setPassenger(getOwner());
|
Chicken.setPassenger(getOwner());
|
||||||
|
Loading…
Reference in New Issue
Block a user