summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java1
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java28
2 files changed, 29 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 7f10a0f7..27c1851a 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 00000000..c1cab93e
--- /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;
+ }
+}