@Override
	public void handle(Player player, Packet packet) {
		final int id = packet.getShort() & 0xFFFF;
		final int slot = packet.getShortA() & 0xFFFF;
		final int interfaceId = packet.getShortA() & 0xFFFF;

		switch (interfaceId) {
		case Inventory.INTERFACE:
			if (slot >= 0 && slot < Inventory.SIZE) {
				final Item item = player.getInventory().get(slot);
				if (item != null && item.getId() == id) {
					final EquipmentType type = Equipment.getType(item);
					Item oldEquip = null;
					final boolean stackable = false;
					if (player.getEquipment().isSlotUsed(type.getSlot())
							&& !stackable) {
						oldEquip = player.getEquipment().get(type.getSlot());
						player.getEquipment().set(type.getSlot(), null);
					}
					player.getInventory().set(slot, null);
					if (oldEquip != null) {
						player.getInventory().add(oldEquip);
					}
					if (!stackable) {
						player.getEquipment().set(type.getSlot(), item);
					} else {
						player.getEquipment().add(item);
					}
				}
			}
			break;
		}
	}