[x] You're using the latest build for your server version
[x] This isn't an issue caused by another plugin
[x] You've checked for duplicate issues
[x] You didn't use /reload
Describe the question
Hi. I'm currently working on a plugin which changes the skin and name of the player. I send a PacketPlayOutRespawn to the player to update the player view of his skin. Unfortunately, I'm unable to create the packet because in 1.18, the a field was changed from DimensionManager to Holder<DimensionManager>:
final PacketContainer container = NickoBukkit.getInstance().getProtocolManager().createPacket(PacketType.Play.Server.RESPAWN);
final WrapperPacketPlayOutRespawn respawn = new WrapperPacketPlayOutRespawn(
final World world = player.getWorld();
respawn.setDifficulty(world.getDifficulty());
respawn.setGameMode(player.getGameMode());
respawn.setSeed(world.getSeed());
container.getBooleans().write(1, true);
//respawn.setWorldType(world.getWorldType());
respawn.setWorld(world);
respawn.sendPacket(player);
Thank you to anyone in advance who will help me tackle this issue.
Make sure you're doing the following
/reload
Describe the question Hi. I'm currently working on a plugin which changes the skin and name of the player. I send a PacketPlayOutRespawn to the player to update the player view of his skin. Unfortunately, I'm unable to create the packet because in 1.18, the
a
field was changed fromDimensionManager
toHolder<DimensionManager>
:https://i.imgur.com/JfAYwVH.png
API method(s) used
packet.getModifier().writeSafely(0, ?)
Expected behavior I expect the client to not crash and complaining that
Holder.a()
can't be called becausevar0
(thea
field) isnull
...Code
WrapperPacketPlayOutRespawn
comes from this Spigot thread: https://www.spigotmc.org/threads/protocollib-create-a-packetplayoutrespawn.469718/Thank you to anyone in advance who will help me tackle this issue.