Multiple Entries with Scoreboards

This commit is contained in:
Cryptite
2021-09-21 18:17:33 -05:00
parent 4ab8912b68
commit 0fd1e5c650
3 changed files with 92 additions and 7 deletions

View File

@@ -1,6 +1,18 @@
--- a/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java
+++ b/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java
@@ -200,7 +200,7 @@
@@ -58,6 +58,11 @@
);
}
+ // Paper start - Multiple Entries with Scoreboards
+ public static ClientboundSetPlayerTeamPacket createMultiplePlayerPacket(PlayerTeam team, Collection<String> players, ClientboundSetPlayerTeamPacket.Action operation) {
+ return new ClientboundSetPlayerTeamPacket(team.getName(), operation == ClientboundSetPlayerTeamPacket.Action.ADD ? 3 : 4, Optional.empty(), players);
+ }
+ // Paper end - Multiple Entries with Scoreboards
private ClientboundSetPlayerTeamPacket(RegistryFriendlyByteBuf buf) {
this.name = buf.readUtf();
this.method = buf.readByte();
@@ -200,7 +205,7 @@
ComponentSerialization.TRUSTED_STREAM_CODEC.encode(buf, this.displayName);
buf.writeByte(this.options);
buf.writeUtf(this.nametagVisibility);