Wrong package, missing comment

This commit is contained in:
Cryptite 2023-05-03 13:44:54 -05:00
parent 9f64deb098
commit 6c4fc6ca3b
2 changed files with 7 additions and 7 deletions

View file

@ -4,13 +4,13 @@ Date: Mon, 1 May 2023 15:23:34 -0500
Subject: [PATCH] Add PlayerPreRespawnLocationEvent Subject: [PATCH] Add PlayerPreRespawnLocationEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerPreRespawnLocationEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerPreRespawnLocationEvent.java diff --git a/src/main/java/io/papermc/paper/event/player/PlayerPreRespawnLocationEvent.java b/src/main/java/io/papermc/paper/event/player/PlayerPreRespawnLocationEvent.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..b321cc19d6ca57050233339ced6c84d9f793f1b6 index 0000000000000000000000000000000000000000..7cbe6d1b4d4420e7cccdb0bd54f671569f604c08
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerPreRespawnLocationEvent.java +++ b/src/main/java/io/papermc/paper/event/player/PlayerPreRespawnLocationEvent.java
@@ -0,0 +1,57 @@ @@ -0,0 +1,57 @@
+package com.destroystokyo.paper.event.player; +package io.papermc.paper.event.player;
+ +
+import org.apache.commons.lang3.Validate; +import org.apache.commons.lang3.Validate;
+import org.bukkit.Location; +import org.bukkit.Location;

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerPreRespawnLocationEvent
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 4d837c1530a3031a4c2a5a39d87bd013d60e14a6..75e7430fcc2d55575aadbdf2cb0c3969d7b63741 100644 index 4d837c1530a3031a4c2a5a39d87bd013d60e14a6..c515eb85becbea8e9cad33e1f14f5f0fc3d1f513 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -835,6 +835,14 @@ public abstract class PlayerList { @@ -835,6 +835,14 @@ public abstract class PlayerList {
@ -14,7 +14,7 @@ index 4d837c1530a3031a4c2a5a39d87bd013d60e14a6..75e7430fcc2d55575aadbdf2cb0c3969
if (location == null) { if (location == null) {
+ // Paper start + // Paper start
+ Player respawnPlayer = entityplayer1.getBukkitEntity(); + Player respawnPlayer = entityplayer1.getBukkitEntity();
+ com.destroystokyo.paper.event.player.PlayerPreRespawnLocationEvent preRespawnEvent = new com.destroystokyo.paper.event.player.PlayerPreRespawnLocationEvent(respawnPlayer); + io.papermc.paper.event.player.PlayerPreRespawnLocationEvent preRespawnEvent = new io.papermc.paper.event.player.PlayerPreRespawnLocationEvent(respawnPlayer);
+ preRespawnEvent.callEvent(); + preRespawnEvent.callEvent();
+ location = preRespawnEvent.getRespawnLocation(); + location = preRespawnEvent.getRespawnLocation();
+ +
@ -27,7 +27,7 @@ index 4d837c1530a3031a4c2a5a39d87bd013d60e14a6..75e7430fcc2d55575aadbdf2cb0c3969
blockposition = entityplayer1.getSpawnPoint(worldserver1); blockposition = entityplayer1.getSpawnPoint(worldserver1);
location = new Location(worldserver1.getWorld(), (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.1F), (double) ((float) blockposition.getZ() + 0.5F), worldserver1.levelData.getSpawnAngle(), 0.0F); // Paper - use world spawn angle location = new Location(worldserver1.getWorld(), (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.1F), (double) ((float) blockposition.getZ() + 0.5F), worldserver1.levelData.getSpawnAngle(), 0.0F); // Paper - use world spawn angle
} }
+ } + } // Paper
- Player respawnPlayer = entityplayer1.getBukkitEntity(); - Player respawnPlayer = entityplayer1.getBukkitEntity();
PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !isAnchorSpawn, isAnchorSpawn, reason, com.google.common.collect.ImmutableSet.<org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag>builder().add(respawnFlags)); // Paper - Fix anchor respawn acting as a bed respawn from the end portal PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !isAnchorSpawn, isAnchorSpawn, reason, com.google.common.collect.ImmutableSet.<org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag>builder().add(respawnFlags)); // Paper - Fix anchor respawn acting as a bed respawn from the end portal