denyCall()
denyCall
Method in MelodyManager
Class
denyCall
Method in MelodyManager
ClassThe denyCall
method is used to deny an incoming call between two players in the MelodyMine plugin. This method changes the status of both players to indicate that the call has been denied and cancels any pending tasks related to the call.
Method Signature
Parameters
melodyPlayer
MelodyPlayer
The player who is denying the call.
targetPlayer
MelodyPlayer
The player who initiated the call.
Example
Here is an example of how to use the denyCall
method in another plugin:
In this example, the denyIncomingCall
method in the ExamplePlugin
class retrieves the MelodyPlayer
instances for the denier and initiator players using their UUIDs. It then uses the denyCall
method of the MelodyManager
class to deny the call. If the call is successfully denied, a message is logged to the console. If one or both of the players are not found, a warning is logged instead.
Last updated