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)
Linked Issues
is duplicated by3
Created Issue:
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 mbaxterFrom console:
/scoreboard teams join bananas mbaxterBecause 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)
relates to
is duplicated by
is duplicated by
Duplicate of MC-12452, please use the search function to see if your bug has already been submitted. Currently over 58% of tickets are being closed as duplicate.
Confirmed.
Server 1.5.1 throws:
java.lang.NullPointerException at arj.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)Updated for 13w16b
java.lang.NullPointerException at arz.a(SourceFile:190) at gy.a(SourceFile:67) at ht.g(SourceFile:331) at ht.b(SourceFile:128) at aa.a(SourceFile:53) at ib.ao(SourceFile:291) at ib.r(SourceFile:259) at net.minecraft.server.MinecraftServer.q(SourceFile:405) at net.minecraft.server.MinecraftServer.run(SourceFile:339) at gr.run(SourceFile:582)Still present through 1.6.1pre
java.lang.NullPointerException at atc.a(SourceFile:186) at hm.a(SourceFile:67) at ih.g(SourceFile:346) at ih.b(SourceFile:134) at aa.a(SourceFile:54) at ip.ar(SourceFile:295) at ip.t(SourceFile:263) at net.minecraft.server.MinecraftServer.s(SourceFile:405) at net.minecraft.server.MinecraftServer.run(SourceFile:339) at hf.run(SourceFile:582)Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Still present 1.6.2
[INFO] An unknown error occurred while attempting to perform this command java.lang.NullPointerException at atg.a(SourceFile:186) at ho.a(SourceFile:67) at ij.g(SourceFile:346) at ij.b(SourceFile:134) at aa.a(SourceFile:54) at ir.ar(SourceFile:295) at ir.t(SourceFile:263) at net.minecraft.server.MinecraftServer.s(SourceFile:405) at net.minecraft.server.MinecraftServer.run(SourceFile:339) at hh.run(SourceFile:582)