How to set the container type for P.S.OPEN_SCREEN?
tinyoverflow opened this issue ยท 2 comments
Make sure you're doing the following
- You're using the latest build for your server version
- This isn't an issue caused by another plugin
- You've checked for duplicate issues
- You didn't use
/reload
Describe the question
I would like to send a OPEN_SCREEN package to the player. Unfortunately I'm not able to set the container type. It seems to use an InternalStructure
with a handle of net.minecraft.world.inventory.Containers
and I'm not sure if and how I can set that with ProtocolLib.
Code
PacketContainer packet = manager.createPacket(PacketType.Play.Server.OPEN_WINDOW);
packet.getIntegers().write(0, id);
// How to set the container type?
packet.getChatComponents().write(0, WrappedChatComponent.fromText(title));