diff --git a/Spigot-Server-Patches/Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/Player.setPlayerProfile-API.patch index 47557f196c..4e91c59d43 100644 --- a/Spigot-Server-Patches/Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/Player.setPlayerProfile-API.patch @@ -68,6 +68,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import net.minecraft.server.MapIcon; import net.minecraft.server.MinecraftKey; import net.minecraft.server.NBTTagCompound; +@@ -0,0 +0,0 @@ import net.minecraft.server.PacketPlayOutMap; + import net.minecraft.server.PacketPlayOutNamedSoundEffect; + import net.minecraft.server.PacketPlayOutPlayerInfo; + import net.minecraft.server.PacketPlayOutPlayerListHeaderFooter; ++import net.minecraft.server.PacketPlayOutRespawn; + import net.minecraft.server.PacketPlayOutSpawnPosition; + import net.minecraft.server.PacketPlayOutStopSound; + import net.minecraft.server.PacketPlayOutTitle; @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { hiddenPlayers.put(player.getUniqueId(), hidingPlugins); @@ -134,7 +142,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + reregisterPlayer(handle); + + //Respawn the player then update their position and selected slot -+ //connection.sendPacket(new net.minecraft.server.PacketPlayOutRespawn(handle.dimension, net.minecraft.server.WorldData.c(handle.world.getWorldData().getSeed()), handle.world.getWorldData().getType(), handle.playerInteractManager.getGameMode())); // TODO: Fix this if you care to make it work ++ WorldServer worldserver = handle.getWorldServer(); ++ connection.sendPacket(new net.minecraft.server.PacketPlayOutRespawn(worldserver.getTypeKey(), worldserver.getDimensionKey(), net.minecraft.server.BiomeManager.a(worldserver.getSeed()), handle.playerInteractManager.getGameMode(), handle.playerInteractManager.c(), worldserver.isDebugWorld(), worldserver.isFlatWorld(), true)); + handle.updateAbilities(); + connection.sendPacket(new net.minecraft.server.PacketPlayOutPosition(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), new HashSet<>(), 0)); + net.minecraft.server.MinecraftServer.getServer().getPlayerList().updateClient(handle);