mirror of
https://github.com/System-End/Discord-MC-Chat.git
synced 2026-04-19 16:28:23 +00:00
Prepare for next step
This commit is contained in:
parent
8ee189be00
commit
efb2d857c1
3 changed files with 31 additions and 12 deletions
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue