From ea7442232cebd0ec9a2b68ae7073baf608667096 Mon Sep 17 00:00:00 2001
From: CraftBukkit/Spigot <noreply+git-craftbukkit@papermc.io>
Date: Mon, 17 Jan 2011 08:53:42 +0800
Subject: [PATCH] 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>
---
 .../java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java   | 2 +-
 .../main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 8a3f274c84..bf908e16ea 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -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;
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java
index 2a9a1fae5f..04d8d18755 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java
@@ -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) {