#How
1 messages · Page 1 of 1 (latest)
yes you have to send another one to delete the previous team
sadly, I already sent new PacketPlayOutScoreBoardTeam() but still not work
ty for reply
show what you sent
playerConnection.sendPacket(new PacketPlayOutScoreboardTeam())
and plan 2: I saved PacketPlayOutScoreBoardTeam to var, and loaded like
... editing it``` but doesn't work too
you need to set one of the int fields to the option that removes team and the string field team name
if i remeber correctly for 1.16 the int field is i and the string is a
and for remove team its 1
how did you send the first one to change the color
you only set 1 field?
nop
PacketPlayOutScoreboardTeam scoreboard = this.packetPlayOutScoreboardTeam == null ? new PacketPlayOutScoreboardTeam() : this.packetPlayOutScoreboardTeam;
Field field = PacketPlayOutScoreboardTeam.class.getDeclaredField("i");
field.setAccessible(true);
field.set(scoreboard, 0);
Field field2 = PacketPlayOutScoreboardTeam.class.getDeclaredField("a");
field2.setAccessible(true);
field2.set(scoreboard, "team");
Field field3 = PacketPlayOutScoreboardTeam.class.getDeclaredField("c");
field3.setAccessible(true);
field3.set(scoreboard, new ChatMessage(""));
Field field4 = PacketPlayOutScoreboardTeam.class.getDeclaredField("b");
field4.setAccessible(true);
field4.set(scoreboard, new ChatMessage(""));
Field field5 = PacketPlayOutScoreboardTeam.class.getDeclaredField("d");
field5.setAccessible(true);
field5.set(scoreboard, new ChatMessage(""));
Field field6 = PacketPlayOutScoreboardTeam.class.getDeclaredField("j");
field6.setAccessible(true);
field6.set(scoreboard, 0);
Field field7 = PacketPlayOutScoreboardTeam.class.getDeclaredField("g");
field7.setAccessible(true);
field7.set(scoreboard, color);
Field field8 = PacketPlayOutScoreboardTeam.class.getDeclaredField("h");
field8.setAccessible(true);
Collection<String> collection = (Collection<String>) field8.get(scoreboard);
collection.add(this.getEntity().getUniqueIDString());
field8.set(scoreboard, collection);
playerConnection.sendPacket(scoreboard);
this.packetPlayOutScoreboardTeam = scoreboard;```
current code
alright
send the same one with "i" as 1 and "a" as the same as before
remove the team
then send the create one again with the new color
how to remove team?
sending that will remove the team