Comments (12)
I don't understand your issue. Please use images to elaborate further, thx.
from discord-mc-chat.
Intended Styled Chat behaviour:
Styled Chat behaviour with this mod:
from discord-mc-chat.
Ok, I will add a exclude list in the next version.
from discord-mc-chat.
Hello!
Did you add a custom emoji called table
to your Discord server? I'm confused about the :table:
being highlighted in your screenshot.
Also, by "Styled Chat emoji" do you mean the Fabric mod Patbox/StyledChat?
from discord-mc-chat.
Did you add a custom emoji called table to your Discord server? I'm confused about the :table: being highlighted in your screenshot.
So what happens is that all :text:
is ignored discord emoji or not by StyledChat when this mod is on.
Example, there is a :pos:
emoji which gets replaced by your coordinates (so 100 64 -200
) by StyledChat. But when this mod is on, the message just says :pos:
with white color like it's normal text
Also, by "Styled Chat emoji" do you mean the Fabric mod Patbox/StyledChat?
Yes
Yes, I made the issue here because I thought chat text wasn't reaching the StyledChat mod so I deduced the problem was here.
from discord-mc-chat.
May I take a look at your StyledChat config? I installed StyledChat but it didn't work.
Normally :table:
should not be highlighted by MCDC because it is not an emoji name. So your Discord server has added a custom emote called :table:
?
from discord-mc-chat.
what happens when you say :table:
from discord-mc-chat.
Alright, I understand it's because you cancel the function and it never reaches StyledChat's @Redirect
from discord-mc-chat.
I just used the example config given by the author and it works fine. The situation is the same as your screenshot, except that :table:
is not highlighted.
Alright, I understand it's because you cancel the function and it never reaches StyledChat's @Redirect
In this case, I guess there does not seem to have a solution to this problem?
from discord-mc-chat.
Yes there is, why cancel it to make mods incompatible where you can conditionally cancel it.
You could also use StyledChat's API
from discord-mc-chat.
private void handleMessage(TextStream.Message message) {
if (this.player.getClientChatVisibility() == ChatVisibility.HIDDEN) {
this.sendPacket(new GameMessageS2CPacket((new TranslatableText("chat.disabled.options")).formatted(Formatting.RED), MessageType.SYSTEM, Util.NIL_UUID));
} else {
this.player.updateLastActionTime();
String string = message.getRaw();
if (string.startsWith("/")) {
this.executeCommand(string);
} else {
String string2 = message.getFiltered();
Text text = string2.isEmpty() ? null : new TranslatableText("chat.type.text", new Object[]{this.player.getDisplayName(), string2});
Text text2 = new TranslatableText("chat.type.text", new Object[]{this.player.getDisplayName(), string});
this.server.getPlayerManager().broadcast(text2, (player) -> {
return this.player.shouldFilterMessagesSentTo(player) ? text : text2;
}, MessageType.CHAT, this.player.getUuid());
}
this.messageCooldown += 20;
if (this.messageCooldown > 200 && !this.server.getPlayerManager().isOperator(this.player.getGameProfile())) {
this.disconnect(new TranslatableText("disconnect.spam"));
}
}
}
This is the target method void handleMessage(Message message)
of both mods.
this.server.getPlayerManager().broadcast(text2, (player) -> {
return this.player.shouldFilterMessagesSentTo(player) ? text : text2;
}, MessageType.CHAT, this.player.getUuid());
You can see that this method sends a message to all players. Both mods have modified the message, which is why we either redirect or inject and cancel the callback, and both have the same effect that makes the original method not send the original message to all players. If this is not done, the message will be sent twice.
As for the API, I don't think it's taken into consideration as not everyone uses this mod.
If I make a message modification switch, there will be no @ mention and emoji highlighting when it is off. That has to be decided which one to choose I think.
from discord-mc-chat.
I made a message modification switch in the latest commit. There will be no @mentions and emoji highlighting when it is off, but this gives you the opportunity to keep incompatible mods (like FTB Ranks and StyledChat). You have to decide which one to choose for the time being.
from discord-mc-chat.
Related Issues (20)
- [Bug] broadcastPlayerCommandExecution and broadcastSlashCommandExecution not applying when set to false HOT 2
- [Bug] Commands are being broadcasted despite the config toggle being turned off HOT 2
- [Question] How to see in-game chat while using Discord MC Chat with Styled Chat HOT 10
- [Enhancement] Add Geyser Skin API for avatars HOT 1
- [Bug] Server crashes due to player deaths caused by falling blocks and intentional game design HOT 3
- [Question] How does the "channelTopicUpdateInterval" field work? HOT 7
- [Question] Custom command to restart my server doesn't seem to work. HOT 13
- [Enhancement] Separate formatChatMessages into 2 (or more?) settings. HOT 1
- [Bug] Formatting breaks emotes/emoji. Should ignore body of emotes HOT 2
- [Enhancement] Fabric tailor mod support for skin avatars
- [Enhancement] Proximity Chat Discord-Minecraft HOT 7
- [Bug] Update message not sended/sending HOT 6
- [Bug] Cannot perform action due to a lack of Permission. Missing permission: MANAGE_WEBHOOKS HOT 4
- [Bug] Version information in config not updating
- [Bug] Player count not decreasing
- [Enhancement] Modify message parsing for Vanish or advancedchat mods
- [Enhancement] Support Minecraft 1.21
- make a discord server HOT 3
- [Bug] Update notifications are never sent
- Exception stopping server when Geyser is installed HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord-mc-chat.