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

Scoreboard team join command fails on invalid team name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 1.5, Minecraft 1.5.1, Snapshot 13w16a, Snapshot 13w16b, Minecraft 1.5.2, Snapshot 13w19a, Snapshot 13w21a, Snapshot 13w21b, Minecraft 1.6, Minecraft 1.6.1, Minecraft 1.6.2
    • Fix Version/s: Minecraft 13w36a
    • Confirmation Status:
      Confirmed

      Description

      The command "/scoreboard teams join" does not check if team names are valid before attempting to place a player on the team.

      How to reproduce with a fresh server:

      From in-game:
      /scoreboard teams join bananas
      /scoreboard teams join bananas mbaxter

      From console:
      /scoreboard teams join bananas mbaxter

      Because the team "bananas" doesn't exist in this scenario and the server doesn't check to confirm, it will result in an NPE when it tries to add the player name to the team player list.

      Example NPE on 1.5 release, using the console example:

      java.lang.NullPointerException
              at ard.a(SourceFile:190)
              at gw.a(SourceFile:67)
              at hr.g(SourceFile:329)
              at hr.b(SourceFile:126)
              at y.a(SourceFile:52)
              at hz.am(SourceFile:288)
              at hz.r(SourceFile:256)
              at net.minecraft.server.MinecraftServer.q(SourceFile:397)
              at net.minecraft.server.MinecraftServer.run(SourceFile:331)
              at gp.run(SourceFile:573)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                evilseph EvilSeph (Warren Loo)
                Reporter:
                mbaxter mbaxter (Matt Baxter)
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: