PostEnableVoiceEvent
PostEnableVoiceEvent
Event Details
playerName
String
The name of the player who enabled their voice chat.
playerUuid
String
The UUID of the player who enabled their voice chat.
playerServer
String
The server of the player who enabled their voice chat.
targetSocketID
String
The socket ID of the player who enabled their voice chat.
Methods
getPlayer()
MelodyPlayer
Returns the MelodyPlayer
instance of the player who enabled their voice chat.
getTargetPlayer()
MelodyPlayer
Returns the MelodyPlayer
instance of the player who is the target of the voice chat.
Example Usage
Here is an example of how to listen to this event using the Bukkit event API in Java:
In this example, we create a listener for the PostEnableVoiceEvent
. When the event is triggered, we retrieve the name of the player who enabled their voice chat and log it to the console.
Last updated