Skip to content

Commit

Permalink
Merge pull request #56 from TeamKun/bugs/nullpo-bukkit-reporter-input…
Browse files Browse the repository at this point in the history
…-token

fix(plugin): NullPointerException when the InputBoard of IllegalActionInputException is null
  • Loading branch information
PeyaPeyaPeyang authored Dec 31, 2024
2 parents 1ae3fd0 + c4c4b53 commit 6892f45
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,10 @@ else if (actionResult.getError() != null)
if (error instanceof IllegalActionInputException)
{
IllegalActionInputException e = (IllegalActionInputException) error;
causeMessage = "Illegal action input '" + e.getToken().getName() + "': " + e.getMessage();
if (e.getToken() == null)
causeMessage = "Illegal action input: " + e.getMessage();
else
causeMessage = "Illegal action input '" + e.getToken().getName() + "': " + e.getMessage();
}
else
causeMessage = "Caused by " + error.getClass().getSimpleName() + " - " + error.getMessage();
Expand Down

0 comments on commit 6892f45

Please sign in to comment.