mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-30 19:40:37 +01:00
parent
900f77fa66
commit
2a6753b507
1 changed files with 10 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue