Advertisement
SpigotPlugins

Untitled

Feb 19th, 2018
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.94 KB | None | 0 0
  1. if(counter < inventoryRows){
  2.             playerInventory.setItem(counter * 9, new ItemStack(Material.STONE));
  3.             for(int i = 0 ; i < counter ; i++){
  4.                 for(int b = 0 ; b < 9 ; b++){
  5.                     if(playerInventory.getItem(i * 9 + b) != null){
  6.                         continue;
  7.                     } else {
  8.                         playerInventory.setItem(i * 9 + b, new ItemStack(Material.STONE));
  9.                         break;
  10.                     }
  11.                 }
  12.             }
  13.         } else {
  14.             for(int i = 0 ; i < inventoryRows ; i++){
  15.                 for(int b = 0 ; b < 9 ; b++){
  16.                     if(playerInventory.getItem(i * 9 + b) != null){
  17.                         continue;
  18.                     } else {
  19.                         playerInventory.setItem(i * 9 + b, new ItemStack(Material.STONE));
  20.                         break;
  21.                     }
  22.                 }
  23.             }
  24.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement