13
0
geforkt von Mirrors/Velocity

Fix type
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Lixfel 2024-06-19 10:21:36 +02:00
Ursprung 2f5a27a708
Commit 8103135dfb

Datei anzeigen

@ -42,9 +42,9 @@ public class UpdateTeamsPacket implements MinecraftPacket {
private int color; private int color;
private byte friendlyFlags; private byte friendlyFlags;
private List<Player> players; private List<String> players;
public UpdateTeamsPacket(String name, Mode mode, Component displayName, Component prefix, Component suffix, NameTagVisibility nameTagVisibility, CollisionRule collisionRule, int color, byte friendlyFlags, List<Player> players) { public UpdateTeamsPacket(String name, Mode mode, Component displayName, Component prefix, Component suffix, NameTagVisibility nameTagVisibility, CollisionRule collisionRule, int color, byte friendlyFlags, List<String> players) {
this.name = name; this.name = name;
this.mode = mode; this.mode = mode;
this.displayName = displayName; this.displayName = displayName;
@ -92,15 +92,16 @@ public class UpdateTeamsPacket implements MinecraftPacket {
} else { } else {
byteBuf.writeByte((byte) color); byteBuf.writeByte((byte) color);
} }
ProtocolUtils.writeVarInt(byteBuf, players.size()); ProtocolUtils.writeVarInt(byteBuf, players.size());
for (Player player : players) { for (String player : players) {
ProtocolUtils.writeString(byteBuf, player.getUsername()); ProtocolUtils.writeString(byteBuf, player);
} }
break; break;
case ADD_PLAYER, REMOVE_PLAYER: case ADD_PLAYER, REMOVE_PLAYER:
ProtocolUtils.writeVarInt(byteBuf, players.size()); ProtocolUtils.writeVarInt(byteBuf, players.size());
for (Player player : players) { for (String player : players) {
ProtocolUtils.writeString(byteBuf, player.getUsername()); ProtocolUtils.writeString(byteBuf, player);
} }
break; break;
case REMOVE: case REMOVE:
@ -186,7 +187,7 @@ public class UpdateTeamsPacket implements MinecraftPacket {
return friendlyFlags; return friendlyFlags;
} }
public List<Player> getPlayers() { public List<String> getPlayers() {
return players; return players;
} }
@ -226,7 +227,7 @@ public class UpdateTeamsPacket implements MinecraftPacket {
this.friendlyFlags = friendlyFlags; this.friendlyFlags = friendlyFlags;
} }
public void setPlayers(List<Player> players) { public void setPlayers(List<String> players) {
this.players = players; this.players = players;
} }
} }