mojira.dev
MC-121760

Function returns java.lang.NullPointerException

If I run a function that contains this one line:

say Hi

the function works just fine. But if I run a function that uses a new command in it, like this:

execute as @p run say Hi

the function returns 'java.lang.NullPointerException' where it should have displayed 'Hi'. The game doesn't crash or anything, the function just stops executing with that error.

Also, if I run a function that contains these lines:

say Hi
execute as @p run say How are you
say Bye

It returns 'Hi' and 'java.lang.NullPointerException'. So the function bails when it hits the new command and won't continue with the next commands. The attached picture shows this function in action.

Happy debugging! 🙂

EDIT: Edited for clarity

Linked issues

Attachments

Comments 0

No comments.

Jay Eff

(Unassigned)

Unconfirmed

Minecraft 17w45a

Retrieved