Keep moveToWorld with old method signature

This commit is contained in:
KennyTV 2021-05-04 11:55:29 +02:00 committed by Mariell Hoversholm
parent 99a66a5838
commit 9ed3e470d9

View file

@ -18,19 +18,24 @@ index b543776da3b799643893984a8c6f29477ed78d4a..9455cb9bc849a330e57fdc466fb51902
} else {
if (this.player.getHealth() > 0.0F) {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index f8f0212497ad4fbb1273820a06a4ae6721053b8e..6bfa8020c19721dd63e038e4b866a7d3a24e66ac 100644
index f8f0212497ad4fbb1273820a06a4ae6721053b8e..aaa6f3aeaf1b47275a1c8fc22ee99475e62c32a0 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -820,7 +820,7 @@ public abstract class PlayerList {
@@ -820,7 +820,13 @@ public abstract class PlayerList {
return this.moveToWorld(entityplayer, this.server.getWorldServer(entityplayer.getSpawnDimension()), flag, null, true);
}
- public EntityPlayer moveToWorld(EntityPlayer entityplayer, WorldServer worldserver, boolean flag, Location location, boolean avoidSuffocation) {
+ public EntityPlayer moveToWorld(EntityPlayer entityplayer, WorldServer worldserver, boolean flag, Location location, boolean avoidSuffocation, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag...respawnFlags) { // Paper
+ // Paper start
public EntityPlayer moveToWorld(EntityPlayer entityplayer, WorldServer worldserver, boolean flag, Location location, boolean avoidSuffocation) {
+ return moveToWorld(entityplayer, worldserver, flag, location, avoidSuffocation, new org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag[0]);
+ }
+
+ public EntityPlayer moveToWorld(EntityPlayer entityplayer, WorldServer worldserver, boolean flag, Location location, boolean avoidSuffocation, org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag...respawnFlags) {
+ // Paper end
entityplayer.stopRiding(); // CraftBukkit
this.players.remove(entityplayer);
this.playersByName.remove(entityplayer.getName().toLowerCase(java.util.Locale.ROOT)); // Spigot
@@ -920,7 +920,7 @@ public abstract class PlayerList {
@@ -920,7 +926,7 @@ public abstract class PlayerList {
}
Player respawnPlayer = cserver.getPlayer(entityplayer1);