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
playerUuid
String
The UUID of the player for whom the volume is to be set.
targetSocketID
String
The socket ID of the target player.
playerLocation
Location
The current location of the player.
targetLocation
Location
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