daily pastebin goal
7%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static void updateTable() {
  2.         ArrayList<Item> items = new ArrayList<Item>(28);
  3.         for (Item i:Inventory.getItems()) {
  4.                 items.add(i);
  5.         }
  6.  
  7.         for (int i = 0; i < items.size(); i++) {
  8.             for (int k = 0; k < items.size(); k++) {
  9.                 if(items.get(i).equals(items.get(k)) && i != k)
  10.                     items.remove(k);
  11.                     }
  12.             Item item = items.get(i);
  13.             int count = Inventory.getCount(true, item.getId());
  14.             Gui.InventoryTable.setValueAt((String) (item.getName().substring(12)), i, 0);
  15.             Gui.InventoryTable.setValueAt((String) "x" + count, i, 1);
  16.            
  17.         }
  18.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top