setVolume()
setVolume
Method in MelodyManager
Class
setVolume
Method in MelodyManager
ClassThe setVolume
method is a part of the MelodyManager
class. It is used to set the volume for a specific player in the game. The volume level is determined based on the player's location and the target's location.
Method Signature
Parameters
Parameter | Type | Description |
---|---|---|
|
| The UUID of the player for whom the volume is to be set. |
|
| The socket ID of the target player. |
|
| The current location of the player. |
|
| The current location of the target player. |
Example
Here is an example of how to use the setVolume
method in another plugin:
In this example, the adjustPlayerVolume
method retrieves the UUIDs and locations of the player and target, and then uses these values to call the setVolume
method. After the volume is set, a message is logged to the console.
Last updated