Prepare for next step

This commit is contained in:
Xujiayao 2026-03-19 20:55:50 +08:00
parent 8ee189be00
commit efb2d857c1
3 changed files with 31 additions and 12 deletions

View file

@ -107,6 +107,21 @@ public class NetworkManager {
clientChannels.forEach((channel, name) -> channel.writeAndFlush(packet));
}
/**
* Broadcasts a packet to all connected clients except the excluded client.
* Should be called from server only.
*
* @param packet The packet to send
* @param excludedClientName The client name to exclude
*/
public static void broadcastToClientsExcept(Packet packet, String excludedClientName) {
clientChannels.forEach((channel, name) -> {
if (!name.equals(excludedClientName)) {
channel.writeAndFlush(packet);
}
});
}
/**
* Adds a client channel to the managed list.
*

View file

@ -75,12 +75,14 @@ message_parsing:
ansi_code_blocks: true
polls: true
minecraft_to_discord:
markdown: true
unicode_emojis: true
custom_emojis: true
mentions: true
hyperlinks: true
timestamps: true
overwrite_minecraft_source_messages: false
parsings:
markdown: true
unicode_emojis: true
custom_emojis: true
mentions: true
hyperlinks: true
timestamps: true
# 命令过滤设置
excluded_commands:

View file

@ -109,12 +109,14 @@ message_parsing:
ansi_code_blocks: true
polls: true
minecraft_to_xxxxx: # both minecraft_to_discord and between_minecraft_servers
markdown: true
unicode_emojis: true
custom_emojis: true
mentions: true
hyperlinks: true
timestamps: true
overwrite_minecraft_source_messages: false
parsings:
markdown: true
unicode_emojis: true
custom_emojis: true
mentions: true
hyperlinks: true
timestamps: true
# 命令过滤设置
excluded_commands: