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

This commit is contained in:
speakeasy
2011-01-20 05:41:02 +08:00
committed by tahg
parent eabdc7ffa9
commit e93061be48
3 changed files with 7 additions and 5 deletions

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