Fix up NPE's in EntityMinecart/CraftVehicle and removed a little un-needed code in EntityArrow

By: speakeasy <mekevin1917@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2011-01-20 05:41:02 +08:00
parent 52cc6f5bf6
commit 10b548b654

View file

@ -16,7 +16,7 @@ public abstract class CraftVehicle extends CraftEntity implements Vehicle {
}
public Entity getPassenger() {
return (getHandle().j.getBukkitEntity());
return isEmpty()?null:(getHandle().j.getBukkitEntity());
}
public boolean setPassenger(Entity passenger) {