예제 #1
0
 /**
  * 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!");
 }
예제 #2
0
 /**
  * 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!");
 }