diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index 7f10a0f7c9..27c1851a38 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -142,6 +142,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { if (((EntityTippedArrow) entity).isTipped()) { return new CraftTippedArrow(server, (EntityTippedArrow) entity); } else { return new CraftArrow(server, (EntityArrow) entity); } } + else if (entity instanceof EntitySpectralArrow) { return new CraftSpectralArrow(server, (EntitySpectralArrow) entity); } else if (entity instanceof EntityArrow) { return new CraftArrow(server, (EntityArrow) entity); } else if (entity instanceof EntityBoat) { return new CraftBoat(server, (EntityBoat) entity); } else if (entity instanceof EntityProjectile) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java new file mode 100644 index 0000000000..c1cab93e03 --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java @@ -0,0 +1,28 @@ +package org.bukkit.craftbukkit.entity; + +import net.minecraft.server.EntitySpectralArrow; +import org.bukkit.craftbukkit.CraftServer; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.SpectralArrow; + +public class CraftSpectralArrow extends CraftArrow implements SpectralArrow { + + public CraftSpectralArrow(CraftServer server, EntitySpectralArrow entity) { + super(server, entity); + } + + @Override + public EntitySpectralArrow getHandle() { + return (EntitySpectralArrow) entity; + } + + @Override + public String toString() { + return "CraftSpectralArrow"; + } + + @Override + public EntityType getType() { + return EntityType.SPECTRAL_ARROW; + } +}