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)