From fee33bd1e282122d21d4c2c64f9655bd349af20a Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Fri, 16 Aug 2024 09:20:57 +0200 Subject: [PATCH] Fix NPE for PlayerPostRespawnEvent#getRespawnedLocation (#11268) --- patches/server/Add-PlayerPostRespawnEvent.patch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/patches/server/Add-PlayerPostRespawnEvent.patch b/patches/server/Add-PlayerPostRespawnEvent.patch index 2e661527b3..b8d7a5f2a8 100644 --- a/patches/server/Add-PlayerPostRespawnEvent.patch +++ b/patches/server/Add-PlayerPostRespawnEvent.patch @@ -23,7 +23,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 dimensiontransition = entityplayer.findRespawnPositionAndUseSpawnBlock(flag, DimensionTransition.DO_NOTHING, reason); if (!flag) entityplayer.reset(); // SPIGOT-4785 -+ isRespawn = true; // Paper - Add PlayerPostRespawnEvent ++ // Paper start - Add PlayerPostRespawnEvent ++ isRespawn = true; ++ location = CraftLocation.toBukkit(dimensiontransition.pos(), dimensiontransition.newLevel().getWorld(), dimensiontransition.yRot(), dimensiontransition.xRot()); ++ // Paper end - Add PlayerPostRespawnEvent } else { dimensiontransition = new DimensionTransition(((CraftWorld) location.getWorld()).getHandle(), CraftLocation.toVec3D(location), Vec3.ZERO, location.getYaw(), location.getPitch(), DimensionTransition.DO_NOTHING); }