Guest User

Untitled

a guest
Mar 3rd, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public int getAmount(Player arg0, ItemStack arg1) {
  2. if (arg1 == null)
  3. return 0;
  4. int amount = 0;
  5. for (int i = 0; i < 36; i++) {
  6. ItemStack slot = arg0.getInventory().getItem(i);
  7. if (slot == null || !slot.isSimilar(arg1))
  8. continue;
  9. amount += slot.getAmount();
  10. }
  11. return amount;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment