mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
38b3182a90
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: befcf86d SPIGOT-7740: Fix using new map cursor types 09229095 Add EntityDamageEvent.DamageCause#CAMPFIRE CraftBukkit Changes: a1d2cd152 SPIGOT-7747: Mob head is not dropped when mob was blown up by a charged creeper 8078294bc SPIGOT-7746: Server Crashing when Players Getting into End Portals 8d842e250 SPIGOT-7744: Fix exception for shooting projectiles with flame enchantment 64e0ad129 SPIGOT-7744: Fix crash when shooting arrows in creative mode 819f7a10a Fix player items not dropping on death 0a0229bb5 Implement DamageCause#CAMPFIRE and minor improvement in exception for Unhandled block damage
26 lines
1.8 KiB
Diff
26 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: HexedHero <6012891+HexedHero@users.noreply.github.com>
|
|
Date: Fri, 23 Apr 2021 22:42:42 +0100
|
|
Subject: [PATCH] Expand PlayerRespawnEvent, fix passed parameter issues
|
|
|
|
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
index cd563b639ed970d8bf390eb87f2b66412473a783..47bada5b674c9cc1f30e7d722432f8ecb7fe8f51 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -1197,7 +1197,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()) {
|