Solved Did i do this right?

Discussion in 'Spigot Plugin Development' started by Mhalllz, May 31, 2018.

Thread Status:
Not open for further replies.
  1. Abandond
     
    #1 Mhalllz, May 31, 2018
    Last edited: May 31, 2018
  2. gzx

    gzx

    Each of the ItemStacks is uninitialized. You'll get tons of NullPointerExceptions.
     
  3. None of the ItemStack variables are ever initialized in the beginning, so why even have them there? It'd be better to simply loop through all the available things you can enable and then create itemstacks based off that, and directly add them to the inventory from there. No need for the giant list of null-reference ItemStack variables, or even the tons of else-ifs
     
Thread Status:
Not open for further replies.