mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
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:
parent
c754e7ffc2
commit
ea7442232c
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user