mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@1d2d9566 fix(#13144): Entity pathfinding paths do not appear with 1.21.9 debug flag enabled (#13202) PaperMC/Paper@cf02a071 Add Particle.Spell support to ParticleBuilder#color(Color, float) (#13128) PaperMC/Paper@97452e19 Improvements for Player#openBook (#12582) PaperMC/Paper@d16e03fb [ci/skip] Add IntelliJ tips to CONTRIBUTING.md (#13299)
31 lines
1.8 KiB
Diff
31 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Mariell Hoversholm <proximyst@proximyst.com>
|
|
Date: Sat, 9 Jan 2021 15:26:04 +0100
|
|
Subject: [PATCH] Add EntityTeleportHinderedEvent
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
index 29c08d097b487b177426ec2ea78f8fe79d987bdc..b615c03d73071c923e0a3d1123810e110419318b 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -1390,6 +1390,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player, PluginMessa
|
|
// Minecraft does not currently support teleporting players between worlds with passengers.
|
|
// It causes them to be dismounted, and causes weird behavior.
|
|
if (location.getWorld() != this.getWorld() && !this.getHandle().passengers.isEmpty()) {
|
|
+ if (!new org.purpurmc.purpur.event.entity.EntityTeleportHinderedEvent(entity.getBukkitEntity(), org.purpurmc.purpur.event.entity.EntityTeleportHinderedEvent.Reason.IS_VEHICLE, cause).callEvent()) // Purpur - Add EntityTeleportHinderedEvent
|
|
return false;
|
|
}
|
|
|