Files
Purpur/purpur-server/paper-patches/features/0004-Add-EntityTeleportHinderedEvent.patch
granny d22f66f2ad Updated Upstream (Paper)
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)
2025-11-13 13:21:04 -08:00

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;
}