Plasmo Voice

Plasmo Voice

2M Downloads

[Feature Request] API to Change Voice Distance

DeJayDev opened this issue ยท 2 comments

commented

Hiya,

I would like to be able to set a users voice distance to any value while they are connected to the server from the Spigot plugins API. I started on this, but the complicated branch structure and my inability to truly understand Minecraft mods puts me at a disadvantage.

I'd appreciate if you could do it for me, we'd even be willing to donate <3

commented

We released a test version that works but needs some polishing before full release. You can download it here: https://github.com/plasmoapp/plasmo-voice/releases/tag/1.0.9-spigot-alpha

You can change distance using setVoiceDistances method: https://github.com/plasmoapp/plasmo-voice/blob/spigot-distances/src/main/java/su/plo/voice/PlasmoVoiceAPI.java#L71

For your case, you can send one distance in the distances list, and the player will be forced to use it.

Event PlayerConfigEvent allows you to change the plugin config before sending it to the player: https://github.com/plasmoapp/plasmo-voice/blob/spigot-distances/src/main/java/su/plo/voice/events/PlayerConfigEvent.java

It's also called when changing distance via API. You need to check so that getcause() in the Event is PlayerConfigEvent.Cause.CONNECT, if you want to change the distance on player connect.

We also will release a minor update to the client to fix two minor issues:

  • Sphere visualisation is not rendered when the distance is changed via API
  • Distance won't be updated in the menu if you change it via API when the menu is opened

But you can already make a plugin for this API and it probably won't need any changes with any later stable version.