/** * Removes the amount of items to its stack * * @param item - Item to control * @param amount - Amount to decrease by */ public void removeItem(Item item, int amount) { item.setStack(item.getStack() - amount); Sys.print(amount + " " + item.getName() + " was removed from your inventory!"); }
/** * Adds the amount of items to its stack * * @param item - Item to control * @param amount - Amount to increase by */ public void addItem(Item item, int amount) { item.setStack(item.getStack() + amount); Sys.print(amount + " " + item.getName() + " was added to your inventory!"); }