PaperSpigot-Parent/CraftBukkit-Patches/0060-Allow-Teleportation-of-Vehicles-and-Passengers.patch

41 lines
1.3 KiB
Diff
Raw Normal View History

2014-06-22 11:25:10 +02:00
From 2f2e091205757111702bd087de1e26032403a6d2 Mon Sep 17 00:00:00 2001
2014-04-12 06:18:37 +02: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-06-22 11:25:10 +02:00
index 5142f71..7d16bab 100644
2014-04-12 06:18:37 +02:00
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -459,9 +459,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();
@@ -475,6 +477,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();
--
2014-04-19 01:15:23 +02:00
1.9.1
2014-04-12 06:18:37 +02:00