Proxy #246
-
How to cancel a message ' .help' to the general chat?How do I make an 'invisible dialog for everyone' not on my own behalf? |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 2 replies
-
In relay : When you handle a server bound packet event, the second argument is an object. You can set the .cancelled property to true to cancel the packet. .on("serverbound", (packet, data) => data.cancelled=true)) |
Beta Was this translation helpful? Give feedback.
-
Somehow it doesn't work, I don't understand |
Beta Was this translation helpful? Give feedback.
-
Your code is bad here
|
Beta Was this translation helpful? Give feedback.
-
I wrote as I was told. Is not it so? |
Beta Was this translation helpful? Give feedback.
-
I sat down, found a way to remove the nickname near the list of commands. Now you need to understand how to properly cancel sending text to the global chat when calling the command menu. |
Beta Was this translation helpful? Give feedback.
-
Please elaborate on the problem and the expected outcome. I'm not sure what you're asking. Are you asking for an example to block a clientbound packet from the server ? |
Beta Was this translation helpful? Give feedback.
-
I need to make it so that when a user on the server writes any command (which is in the proxy), it is not sent to the general chat. |
Beta Was this translation helpful? Give feedback.
-
Please post questions on the discord and leave issue tracker for bugs. // Client is sending a message to the server
player.on('serverbound', ({ name, params }, options) => {
if (name === 'text') { // Intercept chat message
options.canceled = true // will no longer be sent to server
}
}) |
Beta Was this translation helpful? Give feedback.
-
It doesn't work |
Beta Was this translation helpful? Give feedback.
-
Will move this to a discussion as this is not an issue with bedrock-protocol. |
Beta Was this translation helpful? Give feedback.
Please post questions on the discord and leave issue tracker for bugs.