RockinChaos / ItemJoin

Get custom items on join.
https://www.craftationgaming.com/
GNU Lesser General Public License v3.0
138 stars 36 forks source link

Velocity Support #545

Closed CJYKK closed 10 months ago

CJYKK commented 1 year ago

Describe The Feature

Hi, could you consider adding Velocity related support to ItemCommands? For example, making "server" support Velocity and adding a "velocity" option to execute Velocity commands.

Expected Solution

Use Velocity in items.yml

Describe Alternatives Considered

Now I'm using CommandSync plugin with "console: sync console bungee send %player% survival". It's working, but too slow.

Additional Context

No response

Checklist

RockinChaos commented 10 months ago

I apologize for my stupidity. I just got around to looking to implement this feature but I am pretty sure this feature already exists. I already designed a resource called CloudSync that hooks into bungee commands and I ended up adding Velocity support a while back.

Simply download; https://www.spigotmc.org/resources/cloudsync.93382/ Drop it into your velocity instance. There is nothing for you to configure with CloudSync.

Then in your items.yml use bungee: as the initiator for the command. The following command should then be written as if you were typing it in the velocity console.

For instance a velocity friends plugin command would be added to ItemJoin's item commands looking like bungee: friend add %player% %player_target% as an example.

CloudSync is similar to CommandSync in premise but CloudSync is waaaay simpler as it uses the backend channels to automatically pass messages back and forth between ItemJoin and CloudSync and visa versa. This results in minimal latency which should be absolutely unnoticeable since its pretty instantaneous.

If you encounter any issues with Velocity support please let me know.

CJYKK commented 10 months ago

I apologize for my stupidity. I just got around to looking to implement this feature but I am pretty sure this feature already exists. I already designed a resource called CloudSync that hooks into bungee commands and I ended up adding Velocity support a while back.

Simply download; https://www.spigotmc.org/resources/cloudsync.93382/ Drop it into your velocity instance. There is nothing for you to configure with CloudSync.

Then in your items.yml use bungee: as the initiator for the command. The following command should then be written as if you were typing it in the velocity console.

For instance a velocity friends plugin command would be added to ItemJoin's item commands looking like bungee: friend add %player% %player_target% as an example.

CloudSync is similar to CommandSync in premise but CloudSync is waaaay simpler as it uses the backend channels to automatically pass messages back and forth between ItemJoin and CloudSync and visa versa. This results in minimal latency which should be absolutely unnoticeable since its pretty instantaneous.

If you encounter any issues with Velocity support please let me know.

It's working, thanks for your patience in replying!