diff options
author | Matthew <stteg@hotmail.com> | 2016-03-17 14:42:58 -0400 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-18 14:30:14 +1100 |
commit | f332350969c89075de604e22f3b4c021694d8a67 (patch) | |
tree | a5dc3d95eaee5e08effe7561ef11e0a727a0b459 | |
parent | e80114dff4db3ecaf7bbc4b090bce1eee494e864 (diff) | |
download | craftbukkit-f332350969c89075de604e22f3b4c021694d8a67.tar craftbukkit-f332350969c89075de604e22f3b4c021694d8a67.tar.gz craftbukkit-f332350969c89075de604e22f3b4c021694d8a67.tar.lz craftbukkit-f332350969c89075de604e22f3b4c021694d8a67.tar.xz craftbukkit-f332350969c89075de604e22f3b4c021694d8a67.zip |
Implement SpectralArrow entity
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java | 1 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java | 28 |
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; + } +} |