mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
Implement SpectralArrow entity
This commit is contained in:
parent
e80114dff4
commit
f332350969
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user