Implement SpectralArrow entity

This commit is contained in:
Matthew 2016-03-17 14:42:58 -04:00 committed by md_5
parent e80114dff4
commit f332350969
2 changed files with 29 additions and 0 deletions

View File

@ -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) {

View File

@ -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;
}
}