Skip to content

Commit b713219

Browse files
committed
Fix ChatExtensions exception
Fixes #1045
1 parent 13b3d86 commit b713219

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/com/comphenix/protocol/utility/ChatExtensions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import java.util.List;
2323
import java.util.UUID;
2424

25+
import com.comphenix.protocol.wrappers.EnumWrappers;
2526
import com.comphenix.protocol.wrappers.WrappedChatComponent;
2627
import org.bukkit.command.CommandSender;
2728
import org.bukkit.entity.Player;
@@ -94,6 +95,7 @@ public static List<PacketContainer> createChatPackets(String message) {
9495
for (WrappedChatComponent component : components) {
9596
PacketContainer packet = new PacketContainer(PacketType.Play.Server.CHAT);
9697
packet.getChatComponents().write(0, component);
98+
packet.getChatTypes().write(0, EnumWrappers.ChatType.SYSTEM);
9799
if (MinecraftVersion.NETHER_UPDATE_2.atOrAbove()) {
98100
packet.getUUIDs().write(0, SERVER_UUID);
99101
}

0 commit comments

Comments
 (0)