Minecraft's getVehicle method can return the same entity if no vehicle is present - convert this case to null

This commit is contained in:
fullwall 2016-04-06 01:23:55 +08:00
parent ae43427e51
commit cfbdb42360

View File

@ -486,7 +486,8 @@ public class NMS {
}
public static Entity getVehicle(org.bukkit.entity.Entity entity) {
return getHandle(entity).getVehicle();
Entity e = getHandle(entity).getVehicle();
return e == getHandle(entity) ? null : e;
}
public static void initNetworkManager(NetworkManager network) {