kangarko / ChatControl-Red

Issue tracker and documentation for the next generation ChatControl Red, the most advanced chat management plugin.
43 stars 22 forks source link

1.20.4: Issue Doesnt work with Component #2716

Closed Maxlego08 closed 3 weeks ago

Maxlego08 commented 3 weeks ago

"/version ChatControlRed" - plugin version

10.27.1

Are you using MySQL?

No

Are you using BungeeCord?

No

Error log (if applicable)

No response

"/chc debug" output (strongly recommended)

No response

Information about the issue/bug

The plugin is not compatible with the Kyori Adventure Component, it will not take into account the format and colors of the text correctly.

    @EventHandler(priority = EventPriority.LOWEST)
    public void onChat(AsyncChatEvent event) {

        Player player = event.getPlayer();
        String message = PlainTextComponentSerializer.plainText().serialize(event.originalMessage());

        TagResolver.Builder builder = TagResolver.builder();
        for (ChatDisplay chatDisplay : this.chatDisplays) {
            message = chatDisplay.display(this.adventureComponent, builder, player, message);
        }

        event.message(adventureComponent.getComponent(player, message, builder.build()));
    }

image

kangarko commented 3 weeks ago

Unfortunately isnt. We have a wide range of compatibility down to 1.7.10 and I have no time nor resources to add more complexities for the latest thing.

Maxlego08 commented 3 weeks ago

Unfortunately isnt. We have a wide range of compatibility down to 1.7.10 and I have no time nor resources to add more complexities for the latest thing.

Still, it’s a shame to continue to support a version as old as 1.7.10, it represents a few dozen servers in the world, while the majority of servers are in the latest version of minecraft. I advise you to change this quickly.

WarnDa commented 3 weeks ago

So we can't even do custom integration using adventure which is now used almost everywhere even by paper

kangarko commented 3 weeks ago

You can do custom integration with our SimpleComponent class or listen to ChatChannelEvent

kangarko commented 3 weeks ago

For context, even Adventure supports 1.7.10+. The issue is we have developed the entire core off of our own framework since Adventure did not exist back then. To rewrite the core requires more time than I have at my disposal unfortunately.