@Override
	public void removeItem(int index, int amount) {
		for (int slot = 0; slot < getCapacity(); slot ++) {
			if (getItems()[slot] == null) {
				continue;
			}
			if (getItems()[slot].getIndex() == index) {
				if (getItems()[slot].getAmount() > amount && ItemDefinition.getDefinitions()[index].isStackable()) {
					getItems()[slot].setAmount(getItems()[slot].getAmount() - amount);
					refreshContainer();
					return;
				}
				getItems()[slot] = new Item(-1, 0);
				refreshContainer();
				getItems()[slot] = null;
				break;
			}
		}
	}