904905906907908909910
event.getMessages().add(new WindowSlotMessage(event.getWindow(), event.getSlot(), event.getItem())); } @EventHandler public void onWindowItems(WindowItemsEvent event) { event.getMessages().add(new WindowItemsMessage(event.getWindow(), event.getItems())); }
48495051525354
short count = buffer.readShort(); ItemStack[] items = new ItemStack[count]; for (int slot = 0; slot < count; slot++) { items[slot] = VanillaByteBufUtils.readItemStack(buffer); } return new WindowItemsMessage(id, items); }