i forgot about the hotbar.

This commit is contained in:
DNx5 2015-11-25 00:44:38 +07:00
parent ea420ab05f
commit 489708b206

View File

@ -127,7 +127,7 @@ public class AuthMeInventoryPacketAdapter extends PacketAdapter {
ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
PacketContainer inventoryPacket = protocolManager.createPacket(PacketType.Play.Server.WINDOW_ITEMS);
inventoryPacket.getIntegers().write(0, PLAYER_INVENTORY);
int inventorySize = CRAFTING_SIZE + ARMOR_SIZE + MAIN_SIZE;
int inventorySize = CRAFTING_SIZE + ARMOR_SIZE + MAIN_SIZE + HOTBAR_SIZE;
ItemStack[] blankInventory = new ItemStack[inventorySize];
Arrays.fill(blankInventory, new ItemStack(Material.AIR));
inventoryPacket.getItemArrayModifier().write(0, blankInventory);