endCall()
endCall
Method in MelodyManager
Class
endCall
Method in MelodyManager
ClassThe endCall
method is used to terminate an ongoing call between two players in the MelodyMine plugin. This method ends the call and updates the status of both players.
Method Signature
Parameters
melodyPlayer
MelodyPlayer
The player who wants to end the call.
targetPlayer
MelodyPlayer
The player who is the other participant of the call.
Example
Here is an example of how to use the endCall
method in another plugin:
In this example, the terminateCall
method in the ExamplePlugin
class retrieves the MelodyPlayer
instances for the initiator and target players using their UUIDs. It then uses the endCall
method of the MelodyManager
class to end a call between them. If the call is successfully terminated, a message is logged to the console. If one or both of the players are not found, a warning is logged instead.
Last updated