2014-01-22 08:19:39 +00:00
|
|
|
From 5c69c193f3ea57e986c6c66e306b62b41721448d Mon Sep 17 00:00:00 2001
|
2013-12-05 20:59:53 +00: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-01-22 08:19:39 +00:00
|
|
|
index 3c17e2f..4fa4142 100644
|
2013-12-05 20:59:53 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
@@ -430,9 +430,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
|
|
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();
|
|
|
|
@@ -446,6 +448,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
|
|
if (event.isCancelled()) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Spigot Start
|
|
|
|
+ eject();
|
|
|
|
+ leaveVehicle();
|
|
|
|
+ // Spigot End
|
|
|
|
|
|
|
|
// Update the From Location
|
|
|
|
from = event.getFrom();
|
|
|
|
--
|
2013-12-09 07:00:58 +00:00
|
|
|
1.8.3.2
|
2013-12-05 20:59:53 +00:00
|
|
|
|