Updates to all Entities to use getBukkitEntity() any time an event is

raised.
Similar update to CraftVehicle and CraftLivingEntity

By: Andrew Ardill <andrew.ardill@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2011-01-17 08:53:42 +08:00
parent c754e7ffc2
commit ea7442232c
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return null;
}
org.bukkit.entity.Entity vehicle = ((CraftWorld)getWorld()).toCraftEntity(entity.k);
org.bukkit.entity.Entity vehicle = (entity.k.getBukkitEntity());
if (vehicle instanceof Vehicle) {
return (Vehicle)vehicle;
}

View File

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