2014-03-09 23:14:45 +01:00
|
|
|
From 5ef7f546dae98c26fa70a70ec99c71058abd76c6 Mon Sep 17 00:00:00 2001
|
2013-12-05 21:59:53 +01:00
|
|
|
From: ItsHarry <info@itsjerryandharry.com>
|
|
|
|
Date: Thu, 5 Dec 2013 21:58:11 +0100
|
|
|
|
Subject: [PATCH] Allow Teleportation of Vehicles and Passengers
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2014-02-12 14:48:26 +01:00
|
|
|
index a85b08e..5fe8276 100644
|
2013-12-05 21:59:53 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2014-02-12 14:48:26 +01:00
|
|
|
@@ -431,9 +431,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2013-12-05 21:59:53 +01:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (entity.vehicle != null || entity.passenger != null) {
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
+ // Spigot Start
|
|
|
|
+ // if (entity.vehicle != null || entity.passenger != null) {
|
|
|
|
+ // return false;
|
|
|
|
+ // }
|
|
|
|
+ // Spigot End
|
|
|
|
|
|
|
|
// From = Players current Location
|
|
|
|
Location from = this.getLocation();
|
2014-02-12 14:48:26 +01:00
|
|
|
@@ -447,6 +449,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2013-12-05 21:59:53 +01:00
|
|
|
if (event.isCancelled()) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Spigot Start
|
|
|
|
+ eject();
|
|
|
|
+ leaveVehicle();
|
|
|
|
+ // Spigot End
|
|
|
|
|
|
|
|
// Update the From Location
|
|
|
|
from = event.getFrom();
|
|
|
|
--
|
2014-03-09 22:37:28 +01:00
|
|
|
1.8.3.2
|
2013-12-05 21:59:53 +01:00
|
|
|
|