diff options
author | feildmaster <admin@feildmaster.com> | 2012-12-06 18:18:28 -0600 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2012-12-07 05:25:11 -0600 |
commit | 78bc0ad1d5cb1429a671a47139b7bb129e1f71b6 (patch) | |
tree | 597441f49199ed2211b7126e1edde6b3b4bc27df | |
parent | 72ee1f3182ffddba14b2b1ca583e5affb795ca91 (diff) | |
download | craftbukkit-78bc0ad1d5cb1429a671a47139b7bb129e1f71b6.tar craftbukkit-78bc0ad1d5cb1429a671a47139b7bb129e1f71b6.tar.gz craftbukkit-78bc0ad1d5cb1429a671a47139b7bb129e1f71b6.tar.lz craftbukkit-78bc0ad1d5cb1429a671a47139b7bb129e1f71b6.tar.xz craftbukkit-78bc0ad1d5cb1429a671a47139b7bb129e1f71b6.zip |
Add the ability to launch WitherSkulls. Fixes BUKKIT-3106
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index a6cbc3d7..0dcadcad 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -17,10 +17,13 @@ import net.minecraft.server.EntityLiving; import net.minecraft.server.EntitySmallFireball; import net.minecraft.server.EntitySnowball; import net.minecraft.server.EntityPlayer; +import net.minecraft.server.EntityWitherSkull; import net.minecraft.server.MobEffect; import net.minecraft.server.MobEffectList; import net.minecraft.server.Packet42RemoveMobEffect; +import org.apache.commons.lang.Validate; + import org.bukkit.Location; import org.bukkit.block.Block; import org.bukkit.craftbukkit.CraftServer; @@ -37,14 +40,12 @@ import org.bukkit.entity.Player; import org.bukkit.entity.Projectile; import org.bukkit.entity.SmallFireball; import org.bukkit.entity.Snowball; -import org.bukkit.entity.Vehicle; +import org.bukkit.entity.WitherSkull; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.util.BlockIterator; import org.bukkit.util.Vector; -import org.apache.commons.lang.Validate; - public class CraftLivingEntity extends CraftEntity implements LivingEntity { public CraftLivingEntity(final CraftServer server, final EntityLiving entity) { super(server, entity); @@ -279,6 +280,8 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } else if (Fireball.class.isAssignableFrom(projectile)) { if (SmallFireball.class.isAssignableFrom(projectile)) { launch = new EntitySmallFireball(world); + } else if (WitherSkull.class.isAssignableFrom(projectile)) { + launch = new EntityWitherSkull(world); } else { launch = new EntityLargeFireball(world); } |