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

Function returns java.lang.NullPointerException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 17w45a
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Windows 10 x64, nVidia GeForce GTX 1060, lots of RAM, Java 1.8.0_25
    • Confirmation Status:
      Unconfirmed

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: