FeuSalamander / Vmessage

the repository of my Velocity Plugin "Vmessage"
https://forums.papermc.io/threads/v-message-simple-global-chatting-w-luckperms-support.527/
18 stars 3 forks source link

Can't seem to get it to work properly on my velocity network #6

Closed Parexy closed 1 year ago

Parexy commented 1 year ago

I have been trying for some time now to get this plugin to work on my server, but seemingly can't get it to work correctly. I have tried both with and without plugins on the backend and proxy server and also with different versions of velocity and luckperms but that doesn't seem to make a difference. I have gotten plugins like HuskChat to work on my server before so i can't really figure out what could be wrong, as im also not getting any error messages in my console to suggest anything could be going wrong. It does also say "Vmessage by FeuSalamander is working !" in the server console and the /vmessage reload cmd also seems to respond, not that i know if it works though. A thing i have noticed though is that the welcome and change server message from the plugin does seem to work, so i really don't know what is wrong with the chat formatting part. image

FeuSalamander commented 1 year ago

But what doesn't work, I can't help you if I don't know what is not working.

Parexy commented 1 year ago

Well the chat formatting part when the player has written a message in chat doesn't work at all. The other parts seem to work fine. image

FeuSalamander commented 1 year ago

It's because my plugin only resends the message to the other servers, not on the server where the original message is sent. It's not a bug, but if you want me to add it to the plugin, I can add it

Parexy commented 1 year ago

Ah okay, my bad. It would be very nice if this plugin could do general message formatting then. The only other plugin i know of for velocity that does this is HuskChat which doesn't support MiniMessage formatting but instead something else. Do you know if it would also be possible to make it so you don't need to type /sendall to chat between servers then? So all player messages are shared regardless of the server you are on? Could just make it an optional setting if people don't want it to work like that. I hope im not asking too much of you.

FeuSalamander commented 1 year ago

Sure I will add it the next weekend because in the week I don't have the time

FeuSalamander commented 1 year ago

Finished !

Parexy commented 1 year ago

I seem to be having some issues regarding this update. The chat part seems to work but it also causes duplicated messages (Is this because i have to cancel them myself?) The join and switch server message doesn't work but i assume that's because of the error message im getting?

image image

FeuSalamander commented 1 year ago

that is weird because I tested it myself and it worked, I will retest it tomorrow

FeuSalamander commented 1 year ago

and it's weird because the error has no link with the update are you sure this error was here in the previous version ?

Parexy commented 1 year ago

Hmm, just tested with older version and now they also don't work, they also have the same error message... I tried with another chat formatting plugin and that worked fine, so im pretty lost on why it suddenly wouldn't work. Tried running all sorts of older and the newest version of velocity unsigned and ran the newest version of luckperms but couldn't get it to go away. I think last time i had a issue with luck perms that i fixed by updating it so maybe that is the same issue this time since i can see it mentions it in the error message, but i cannot get it to go away this time. What version of velocity, luckperms and such are you using in your test env?

Parexy commented 1 year ago

latest.log

FeuSalamander commented 1 year ago

I think the problem with luckperms has no links with the new update and it's just my code which has problems, I will try to fix it soon btw thanks you for helping me to improve my project

FeuSalamander commented 1 year ago

I created a pre release which normally fix your problem with luckperms. I will release it if it works with you.

Parexy commented 1 year ago

Hmm it's seems to work better, im not getting the error anymore. But now im having some other issues like getting kicked when typing a message in chat and the prefix formatting only working in the message portion. image image latest (2).log

I am also using https://github.com/WiIIiam278/Velocity-NoChatSigning and have tried using https://modrinth.com/plugin/unsignedvelocity which makes the chat message appear with the correct prefix formatting, though only in chat messages. This does however make your first message kick you to another server after which this doesn't happen anymore.

This kicking issue does not happen when using a plugin like https://github.com/confor/velocity-chat and im assuming this is not happening for you, so what plugins/settings are you using to get this to stop happening?

FeuSalamander commented 1 year ago

Oh it's because the method I am using to disable the old message don't work with 1.19 and newer. I will try to test it on 1.19 and fix it

FeuSalamander commented 1 year ago

I normally fixed it in the pre release, you just have to download it

Parexy commented 1 year ago

Yes that seems to have fixed the kicking issue. Though the #prefix# is still broken on the join/leave/server-change messages. Everything else seems to work as it should.

image image

FeuSalamander commented 1 year ago

It's because you don't have a prefix, for the release I will remove the prefix placeholder if you don't have a prefix. (That is not a real problem) Btw thank you for your devotion to the project, you have been really patient and helpful.

Parexy commented 1 year ago

Np, it has been a pleasure. Though it does confuse me a bit when you mean i don't have a prefix. Is that because it grabs the data from somewhere else compared to chat messages? Because in the first image at the top of this issue this feature did work. Not that it's a necessary thing, was just wondering. image

Also if it's okay with you, i will probably make another "issue" post with some QoL requests if that isn't too much of a bother for you.

FeuSalamander commented 1 year ago

The prefix and the suffix are taken from your luckperms database. The "[A]" at the left of the messages comme from a custom format or from a prefix ? And sure you can create another issue for qol requests

Parexy commented 1 year ago

After some more testing. What seems to be breaking the prefix for non chat stuff is having multiple prefixes with the same value. image image Since i have been doing this to pick the displayed prefix matching the server someone is currently on that apparently breaks it for the non chat prefix for some reason.

The prefix for non chat also doesn't like prefix stacking as that just causes one them to not display at all. image image

I don't know why, but it seems like the player message formatting works better with luckperms than the join/leave/change server portion does.

Parexy commented 1 year ago

After even more testing that wasn't the issue... It just seems like the non player message #prefix# doesn't like the context part in luckperms, as that breaks it, not the other stuff from before. Though it also doesn't like luckperms prefix/sufix stacking so that part still stands. image image

FeuSalamander commented 1 year ago

So if I correctly understood, I need to fix the prefix stacking and the contexts

Parexy commented 1 year ago

Yes, but only for the join/leave and change server messages, as the player chat formatting works fine for some reason.

FeuSalamander commented 1 year ago

I did some tests and the prefix stacking don't make errors but only one prefix is displayed for message/join/leave/change

Parexy commented 1 year ago

For player messages it does seem to display at least 2 prefixes haven't tested with more. As you can see in one of the latest pictures with the [C] and [A] prefixes which are stacked together. And yes they are both luckyperms prefixes. image

FeuSalamander commented 1 year ago

That is super weird because when I tested only 1 prefix was displayed and all of the events join, leave, switch, message use the same code to get the luckperms prefixes

Parexy commented 1 year ago

Could it have something to do with when the code is executed since both prefix stacking and context works with player messages but they both don't work with the other messages?

FeuSalamander commented 1 year ago

I have 3 problems rn:

Parexy commented 1 year ago

What does your luckperms config look like. Did you set the stacking to look like this? image Because when i set it like that and restart the server then this works image image

Of course it then breaks if i add a condition: image image

And im pretty confused still since i added a condition which broke it but didin't make it into #prefix# this time... Though it still doesn't fully work. It's all very confusing.

FeuSalamander commented 1 year ago

oh it's because I have the "vanilla" luckperms config for the prefix stacking, I will do another tests tomorrow with your config section

Parexy commented 1 year ago

Just in case, you have to change the velocity luckperms config for this feature. The backend server config does not do anything with this.

I also just figured out what caused the #prefix# to appear in server messages.

So something is going wrong with the condition in the server messages and that's actually the only problem there is (the #prefix# issue is just caused by this). Maybe it has something to do with it not getting the players proper info on what world they currently are in since when going over a proxy you have to use the world condition/info instead of server condition/info (idk why that's just what their docs say.) Could it be when the server message is written luckperms does not yet have registered what world/server the player is on yet (Maybe the player is in a limbo state and not in any server yet? i don't really know how it works.), which causes it to not be able to meet the condition due to when it's executed?.

FeuSalamander commented 1 year ago

I tested the original chat message removing in 1.19 but it doesn't work and it's kicking me, how for you it's working

FeuSalamander commented 1 year ago

Now the 2nd problem wasn't a problem so it is resolved and the 3rd has been resolved you can test it

Parexy commented 1 year ago

You currently have to use something like https://github.com/WiIIiam278/Velocity-NoChatSigning since you can't really modify chat with the current version of velocity due to chat signing. It's the same as the normal velocity but with the ability to modify chat.

Parexy commented 1 year ago

And after testing server messages seem to load context prefixes fine now. image

FeuSalamander commented 1 year ago

Ok so it seems to have no bugs left

Parexy commented 1 year ago

Yes everything seems to be fine now, though i never tested with Suffixes since i don't use those, but i imagine those work too.