mojira.dev
MC-216945

Teams become dysfunctional when any entity leaves the team

When someone leaves a team, the team will became unfunctional.
The team still exists, appears within "/team list" and entities can join and be targeted (team=<team>).
However, the team doesn't shows within "/team join" or "/team modify" auto-complete and teams properties (color / collision rule) doesn't work.


How to reproduce:

  • Create a dummy team
    /team add dummy

  • Modify one of the properties of the team
    /team modify dummy color aqua

  • Make you and an entity join the team
    /team join dummy @s
    /team join dummy @e[type=!player,limit=1]

  • Remove the entity from the team
    /team leave @e[type=!player,team=dummy]

  • ❌ The team is now unusable


Console output when joining/leaving the team:

Error executing task on Client
java.lang.NullPointerException
	at dkv.a(SourceFile:220)
	at efc.a(SourceFile:2076)
	at sk.a(SourceFile:130)
	at sk.a(SourceFile:15)
	at pd.a(SourceFile:21)
	at pd$$Lambda$3978/15655054.run(Unknown Source)
	at apq.c(SourceFile:144)
	at apu.c(SourceFile:23)
	at apq.y(SourceFile:118)
	at apq.bl(SourceFile:103)
	at drn.e(SourceFile:1019)
	at drn.e(SourceFile:688)
	at net.minecraft.client.main.Main.main(SourceFile:215)

Linked issues

Attachments

Comments 3

I can confirm. Here's one of the messages shown (when leaving/joining the team):

Error executing task on Client
java.lang.NullPointerException
	at dkv.a(SourceFile:220)
	at efc.a(SourceFile:2076)
	at sk.a(SourceFile:130)
	at sk.a(SourceFile:15)
	at pd.a(SourceFile:21)
	at apq.c(SourceFile:144)
	at apu.c(SourceFile:23)
	at apq.y(SourceFile:118)
	at apq.bl(SourceFile:103)
	at drn.e(SourceFile:1019)
	at drn.e(SourceFile:688)
	at net.minecraft.client.main.Main.main(SourceFile:215)

After a bunch of these messages, only these lines are shown:

Error executing task on Client
java.lang.NullPointerException

When joining a server with 8 teams (one of these was affected by the issue), over 10,000 messages were printed in the game log during the 10 seconds I was connected to the server.

I noticed the same problem. It also occurs when you try to join a team you are already on (see video)

Does not happen in 1.16.5.

Francielly

boq

Confirmed

Very Important

Commands

commands, team, teams

21w08a, 21w08b, 21w10a

21w11a

Retrieved