Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. for (ItemStack item : inv.getContents()) {
  2.     if (item != null && item.equals(assegno)) {
  3.         if (item.getAmount() == 1) {
  4.             inv.remove(assegno);
  5.             Main.economy.depositPlayer(e.getPlayer(), soldiDaRiscattare);
  6.             numeroAssegni++;
  7.         }
  8.         else {
  9.             for (int i = 0; i < item.getAmount(); i++) {
  10.                 inv.remove(assegno);
  11.                 Main.economy.depositPlayer(e.getPlayer(), soldiDaRiscattare);
  12.                 numeroAssegni++;
  13.             }                      
  14.         }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement