diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftMappable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftMappable.java index 8a0de5e21b..da0c2bcea3 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftMappable.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftMappable.java @@ -8,6 +8,7 @@ import org.bukkit.craftbukkit.entity.CraftEntity; * * @author sk89q */ +/**@deprecated*/ public interface CraftMappable { /** * Gets the CraftEntity version. diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index ea89b7b1b2..a03d26db97 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -151,7 +151,7 @@ public class CraftWorld implements World { CraftMinecart.Type.Minecart.getId() ); world.a(minecart); - return new CraftMinecart(world.getServer(), minecart); + return (Minecart) minecart.getBukkitEntity(); } public StorageMinecart spawnStorageMinecart(Location loc) { @@ -163,7 +163,7 @@ public class CraftWorld implements World { CraftMinecart.Type.StorageMinecart.getId() ); world.a(minecart); - return new CraftStorageMinecart(world.getServer(), minecart); + return (StorageMinecart) minecart.getBukkitEntity(); } public PoweredMinecart spawnPoweredMinecart(Location loc) { diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java index 0463bfd8e9..b0912c3128 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java @@ -52,6 +52,8 @@ public class CraftMinecart extends CraftVehicle implements Minecart { * @param server * @param minecart * @return + * + * @deprecated */ public static CraftMinecart getCraftMinecart(CraftServer server, EntityMinecart minecart) { 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 3fbd7c0087..e1cca61387 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 @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import org.bukkit.craftbukkit.CraftServer; -import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.entity.Entity; import org.bukkit.entity.Vehicle; @@ -20,8 +19,12 @@ public abstract class CraftVehicle extends CraftEntity implements Vehicle { } public boolean setPassenger(Entity passenger) { - ((CraftEntity)passenger).getHandle().setPassengerOf(getHandle()); - return true; + if(passenger instanceof CraftEntity){ + ((CraftEntity)passenger).getHandle().setPassengerOf(getHandle()); + return true; + } else { + return false; + } } public boolean isEmpty() {