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 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.mode = mode;
this.displayName = displayName;
@ -92,15 +92,16 @@ public class UpdateTeamsPacket implements MinecraftPacket {
} else {
byteBuf.writeByte((byte) color);
}
ProtocolUtils.writeVarInt(byteBuf, players.size());
for (Player player : players) {
ProtocolUtils.writeString(byteBuf, player.getUsername());
for (String player : players) {
ProtocolUtils.writeString(byteBuf, player);
}
break;
case ADD_PLAYER, REMOVE_PLAYER:
ProtocolUtils.writeVarInt(byteBuf, players.size());
for (Player player : players) {
ProtocolUtils.writeString(byteBuf, player.getUsername());
for (String player : players) {
ProtocolUtils.writeString(byteBuf, player);
}
break;
case REMOVE:
@ -186,7 +187,7 @@ public class UpdateTeamsPacket implements MinecraftPacket {
return friendlyFlags;
}
public List<Player> getPlayers() {
public List<String> getPlayers() {
return players;
}
@ -226,7 +227,7 @@ public class UpdateTeamsPacket implements MinecraftPacket {
this.friendlyFlags = friendlyFlags;
}
public void setPlayers(List<Player> players) {
public void setPlayers(List<String> players) {
this.players = players;
}
}