ProxioDev / ValioBungee

Synchronize players data between BungeeCord / Velocity proxies
Eclipse Public License 1.0
200 stars 51 forks source link

How to send message to player on other proxy ? #22

Closed Elikill58 closed 2 years ago

Elikill58 commented 2 years ago

I want to make people communicate between proxies. I just want to send message between proxies.

I through it had something like api.getProxiedPlayer(UUID) that return Bungeecord's ProxiedPlayer object, which is implemented to send message to other proxy, and then send it to player. But it doesn't exist.

How can I do ? Does it exist ? Should I made my own messaging system with RedisBungee with commands ?

ham1255 commented 2 years ago

That will only work if player is on that proxy where code was executed

At moment there is no api functionality for this, what you can do instead is get jedis instance and make class that extends jedispubsub

ham1255 commented 2 years ago

Also to get jedis instance use JedisPool provided by the api

image

Elikill58 commented 2 years ago

Do you have example ? Such as another message which use this system, or plugin that do it ? Because I don't understand how it will works to get back informations. I have to use JSON or something like that ?

ham1255 commented 2 years ago

Here is plugin bukkit one thats implments this idea https://git.limework.net/Limework/RediSkript

At this class, btw you can avoid the encryption parts https://git.limework.net/Limework/RediSkript/src/branch/master/RediSkript-bukkit/src/main/java/net/limework/rediskript/managers/RedisController.java

Btw it was moved out from github due Govindas which owns the project Due privacy issues

ham1255 commented 2 years ago

You dont need all those parts since most of class is skript stuff You only need runnable interface and jedispubsub

Elikill58 commented 2 years ago

Sorry for late, but I successed to do what you said, so I close the issue.