PacketWrapper icon indicating copy to clipboard operation
PacketWrapper copied to clipboard

WrapperPlayServerSetSlot always set slot 0

Open Aqueuse opened this issue 4 years ago • 0 comments

Hello,

I try to learn protocolLib with the help of PacketWrapper but I'm facing a strange difficulty.

When I try to send an item to a player using WrapperPlayServerSetSlot it always send it to the slot number 0 of this player, even if I set it to another slot.

Here is my code :

ItemStack clockStack = new ItemStack(Material.FILLED_MAP);

WrapperPlayServerSetSlot wrapperPlayServerSetSlot = new WrapperPlayServerSetSlot();

wrapperPlayServerSetSlot.setSlotData(clockStack);
wrapperPlayServerSetSlot.setWindowId((byte) 0);
wrapperPlayServerSetSlot.setSlot((short)36);

wrapperPlayServerSetSlot.sendPacket(player);

Could you please tell me what I'm doing wrong ?

Aqueuse avatar Nov 11 '21 11:11 Aqueuse