Mojira Archive
MC-12452

Scoreboard team join command fails on invalid team name

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)

Fixed

mbaxter (Matt Baxter)

EvilSeph (Warren Loo)

2013-03-20, 05:39 PM

2015-09-07, 09:55 PM

2013-07-24, 07:41 PM

1

3

Confirmed

null-pointer-exception, scoreboard

Minecraft 1.5 - Minecraft 1.6.2Minecraft 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

Minecraft 13w36a