aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0523-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch
diff options
context:
space:
mode:
authorSpottedleaf <[email protected]>2024-07-17 10:24:53 -0700
committerSpottedleaf <[email protected]>2024-07-17 10:28:32 -0700
commit00b949f1bbbf444e2b5e7b8de7c9b14fbd2133c6 (patch)
tree82639515bc5e9ae00c1e639e72137ed51e1ac688 /patches/server/0523-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch
parent967f98aa81da851740aeb429778e46159fd188df (diff)
downloadPaper-00b949f1bbbf444e2b5e7b8de7c9b14fbd2133c6.tar.gz
Paper-00b949f1bbbf444e2b5e7b8de7c9b14fbd2133c6.zip
Remove Moonrise utils to MCUtils, remove duplicated/unused utils
Diffstat (limited to 'patches/server/0523-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch')
-rw-r--r--patches/server/0523-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/patches/server/0523-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch b/patches/server/0523-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch
new file mode 100644
index 0000000000..97439cc49c
--- /dev/null
+++ b/patches/server/0523-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch
@@ -0,0 +1,26 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: HexedHero <[email protected]>
+Date: Fri, 23 Apr 2021 22:42:42 +0100
+Subject: [PATCH] Expand PlayerRespawnEvent, fix passed parameter issues
+
+Co-authored-by: Jake Potrebic <[email protected]>
+
+diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
+index 685601f7ae8396524be6acc1b1394a2403ac6163..3e2a623bda0a65b78cdd725feb4581ded6ec07fe 100644
+--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
++++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
+@@ -1194,7 +1194,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
+ Player respawnPlayer = this.getBukkitEntity();
+ Location location = CraftLocation.toBukkit(dimensionTransition.pos(), dimensionTransition.newLevel().getWorld(), dimensionTransition.yRot(), dimensionTransition.xRot());
+
+- PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn, isAnchorSpawn, reason);
++ // Paper start - respawn flags
++ com.google.common.collect.ImmutableSet.Builder<org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag> builder = com.google.common.collect.ImmutableSet.builder();
++ if (reason == org.bukkit.event.player.PlayerRespawnEvent.RespawnReason.END_PORTAL) {
++ builder.add(org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag.END_PORTAL);
++ }
++ PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn, isAnchorSpawn, reason, builder);
++ // Paper end - respawn flags
+ this.level().getCraftServer().getPluginManager().callEvent(respawnEvent);
+ // Spigot Start
+ if (this.connection.isDisconnected()) {