File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/main/java/com/comphenix/protocol/utility Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -95,10 +95,14 @@ public static List<PacketContainer> createChatPackets(String message) {
95
95
for (WrappedChatComponent component : components ) {
96
96
PacketContainer packet = new PacketContainer (PacketType .Play .Server .CHAT );
97
97
packet .getChatComponents ().write (0 , component );
98
- packet .getChatTypes ().write (0 , EnumWrappers .ChatType .SYSTEM );
99
- if (MinecraftVersion .NETHER_UPDATE_2 .atOrAbove ()) {
100
- packet .getUUIDs ().write (0 , SERVER_UUID );
101
- }
98
+
99
+ // 1.12+
100
+ packet .getChatTypes ().writeSafely (0 , EnumWrappers .ChatType .SYSTEM );
101
+ // 1.8-1.12
102
+ packet .getBytes ().writeSafely (0 , (byte ) 1 );
103
+ // 1.16+
104
+ packet .getUUIDs ().writeSafely (0 , SERVER_UUID );
105
+
102
106
packets .add (packet );
103
107
}
104
108
You can’t perform that action at this time.
0 commit comments