Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-121760

Function returns java.lang.NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 17w45a
    • None
    • Windows 10 x64, nVidia GeForce GTX 1060, lots of RAM, Java 1.8.0_25
    • Unconfirmed

      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

            Unassigned Unassigned
            puppetpal clem Jay Eff
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: