Aust1n46 / VentureChat

GNU General Public License v3.0
37 stars 46 forks source link

Allow other plugins to hook into VentureChat #92

Closed PhoenixOrigin closed 1 month ago

PhoenixOrigin commented 9 months ago

I'm making a plugin and as far as I could see, the only chat message sending possiblity was for DiscordSRV so I just made an extra simple new function for other plugins. Please tell me if I need to change anything / there is a reason this doesn't already exist

Aust1n46 commented 8 months ago

What is the purpose of this PR?

Not trying to sound like a jerk, but this new method isn't going to do anything when it's invoked. There's no listener for that type of message packet.

What exactly are you trying to do? Send messages over VentureChat's plugin messaging channel? Or just send a message to listeners of a particular channel? Because you can do the latter by iterating over the online players and checking if they're listening to a channel.

PhoenixOrigin commented 8 months ago

Give other plugins the ability to act like DiscordSRV (send a message to all online players from discord)

Aust1n46 commented 7 months ago

The DiscordSRV hook only works because I created it and added routing support on both the proxy side of the plugin and the server sided plugin message listener.

If you want a generic way to send pub/sub messages using plugin message channels, you can implement that in your own plugin and hook into VentureChat's API to access channel data.

Or if you're doing a one off implementation just for yourself, you could fork this repo and implement the listeners inside of VentureChat for your plugin. But that's not something I'd accept as a PR contribution.

Sorry for the late reply, I don't always get around to checking this alongside the Spigot forums that often.