mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 07:23:43 +01:00
7b0c576798
Allows us much greater control over the Spigot portion of the code and makes us more "proper" Credit to @Dmck2b for originally passing the idea along a while back
41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
From a13d03bb5a250afe690b384d547dc1c2ad9b9ae8 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 232df48..a77b2d9 100644
|
|
--- 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();
|
|
--
|
|
1.9.1
|
|
|