getMelodyPlayerFromSocketID()
getMelodyPlayerFromSocketID
Method in MelodyManager
Class
getMelodyPlayerFromSocketID
Method in MelodyManager
ClassThe getMelodyPlayerFromSocketID
method is used to retrieve the MelodyPlayer
instance for a player in the MelodyMine plugin. This method uses the player's socket ID to find the corresponding MelodyPlayer
instance.
Method Signature
Parameters
Parameter
Type
Description
socketID
String
The socket ID of the player whose MelodyPlayer
instance is to be retrieved.
Example
Here is an example of how to use the getMelodyPlayerFromSocketID
method in another plugin:
In this example, the printPlayerNameFromSocketID
method in the ExamplePlugin
class retrieves the MelodyPlayer
instance for the player using their socket ID. It then prints the player's name to the console. If the player is not found, a warning is logged instead.
Last updated