AdvancedPlugins / Chat

The Best Chat Plugin for Spigot Servers, including AI chat monitoring, endless formatting capabilities, custom commands and way more
3 stars 2 forks source link

problem with legacy color support & minimessage implementation #24

Closed Z3r0xh closed 1 month ago

Z3r0xh commented 2 months ago

Describe the bug

I have a problem when implementing messages and legacy colors

image

this is my format https://pastebin.com/HcTH2brS

How to reproduce

just add various hovers and click actions to the placeholders

Screenshots / Videos

No response

Server Log

No response

ThomasWega commented 2 months ago

Were you able to figure out which part of the text this happens at?

Z3r0xh commented 2 months ago

Were you able to figure out which part of the text this happens at?

Yes, I think it appears that way because the last \ does not recognize them well and duplicates them.

It may also be when joining hex and placeholder that are with &4 etc., I can give you the prefix that I use in the placeholder of vult_prefix

%vaul_prefiz% = &#000000&l[&#d60000&lO&#eb1a2a&lW&#ff3453&lN&#eb1a2a&lE&#d60000&lR&#000000&l] &4

What I can't get is that it looks good, it still appears like in the photo no matter how much I modify things

ThomasWega commented 2 months ago

if you remove the placeholder or use only minimessage it will work fine?

Z3r0xh commented 2 months ago

if you remove the placeholder or use only minimessage it will work fine?

I found the solution by trying things with the prefix, but yes, the plugin is doing something wrong when loading the minimum messages.

ThomasWega commented 2 months ago

it will be a combination of legacy and minimessage which causes this. Could you please assist us in figuring out the exact scenario in which this happens? What have you replaced to fix this? Can you give some examples when it does happen and when it does now please?

Z3r0xh commented 2 months ago

it will be a combination of legacy and minimessage which causes this. Could you please assist us in figuring out the exact scenario in which this happens? What have you replaced to fix this? Can you give some examples when it does happen and when it does now please?

I will gladly help you.

I have realized that when using hex colors in the placeholder and putting it inside a hover with more options:

(<hover:show_text:'---------------------------------------- --------\n<color:#ff1c03> This is the owner of the server! \n-------------- ----------------------------------'><click:open_url:'https:// store.unnamecraft.com/'>%vault_prefix%)

The error is strange. Basically it is taking out the placeholder that is in hex colors, as if they were mini-messages. The in the image above is not written anywhere, this was a hex colo that was converted to minimessage for some reason.

While I was editing the achat format for a while, it occurred to me to change the placeholder of %vault_prefix%, to which I added an &r at the end and it stopped making errors.

So my conclusion is that there is something with minimesages that doesn't work...

this is my prefix now from %vaul_prefix%:

prefix.10.&#000000&l[&#d60000&lO&#eb1a2a&lW&#ff3453&lN&#eb1a2a&lE&#d60000&lR&#000000&l]&r

With this it works, but if you remove the final &r it won't and it will show it to you as if it were minimesages.

ThomasWega commented 2 months ago

We'll investigate this. Thank you. Glad you were able to figure out a solution