[Bug] Chat links doesn't work after installing CoreProtect
braydel opened this issue ยท 6 comments
Hi all, I've been using CoreProtect for a while, and I've isolated this issue to the CoreProtect plugin and even (kinda) "patched" it on my source.
Basically, when a player posts a link in the chat, you should be able to click on the link and open it in your default browser. This isn't working for CoreProtect because for some reason the PlayerChatListener and the PlayerCommandListener is preventing this chat feature of working.
So, if I comment out this code from the ListenerHandler then the default implementation where links are clickable in chat works.
pluginManager.registerEvents(new PlayerChatListener(), plugin); pluginManager.registerEvents(new PlayerCommandListener(), plugin);
I'm guessing this is because CoreProtect is taking the users chat and then copying the message canceling the event and then directly sending the message in chat, not entirely sure though because the last time I looked at this was a few months ago.
Since I don't know the codebase for CoreProtect well, nor do I know Java well (I'm mostly a web asp.net core developer) I have a few questions before I action this.
- Why is this enabled even when logging for player chats / commands are disabled.
- If I only have block logging enabled, will there be any ramifications for commenting out the PlayerChatListener / PlayerCommandListener
- What would be a proper fix for this? Does Minecraft have some utility library where we can re-add a hyperlink in a players message?
I'm guessing this is because CoreProtect is taking the users chat and then copying the message canceling the event and then directly sending the message in chat
CoreProtect does not intercept chat messages.
Also unable to replicate this issue.
It might be patched in newer versions, I've noticed that one of the listeners initializations was changed. It looks like there was changes to the PlayerChatListener, and in result now it is using the PaperChatListener if its available.
Let me update to the most recent 20.4 version, I was using CoreProtect 20.3 and haven't updated CoreProtect since 1.18 was released.
If it was patched from a recent change, sorry for making an issue I should've checked and updated before I created the issue. I'll update CoreProtect later tonight once nobody is online.
Intresting... I don't have DarkerNights or TransitTubes. I had a test server with CoreProtect as the only plugin and with my server configuration files and I replicated the issue. Obviously, I tested my server's configuration before I deployed CoreProtect. I have decompiled the CoreProtect jar I have installed on my server, and it looks like the Listener changes are implemented.
Possibly it could be an issue with my paper configuration, but I've also completely reset my paper configuration and copied my old configuration to a test server when I was trying to figure out what was causing this issue.
Let me update this thread when I have more information so you can replicate it and if it continues after I update both paper and CoreProtect. Both CoreProtect and Paper is out of date currently, so hopefully that's the issue. If we potentially can't figure out the issue, are there any ramifications if I just comment out the PlayerChatListener and the PlayerCommandListener?
Updating paper / core protect in about 20 minutes, if that doesn't fix the issue, I'll create another test server and see if I can replicate the issue again.