Error throw from alias plugin

Discussion in 'Spigot Plugin Development' started by Spectrumization, Jun 22, 2018.

  1. Hi i recently made an alias plugin which fully works and does everything its meant to but now whenever a command for it is typed it throws a huge error to the console, it doesn't affect the functionality of the plugin however i would like to try get this ironed out, only issue is i have no clue as to what the error is. Any help is greatly appreciated

  2. NPE thrown at line 18 in your Listeners class.
    • Winner Winner x 1
  3. Thanks very much got it all sorted now.
  4. If you're getting an error, fixing a bug is normally easy as can be.
    Simply go to the bottom of the stack trace (that's what that error message is) where it says caused by. In this case, it says NullPointerException.
    If you can't figure out what an exception is based on its name (null pointer exception is easy enough to figure out, something is null), you can google them and get a nice little explanation. Now, just below that, are a few lines. Ignore everything except the line closest to the top that you can recognize has one of your classes' names in the parenthesis. (In this case, You'll see a colon and a number. That number is the exact line your error is on!
    • Agree Agree x 1