mute()

Mute Method in MelodyManager Class

The mute method in the MelodyManager class is used to mute a player in the MelodyMine plugin. This method takes the UUID of the player as a parameter and performs the mute operation.

Method Signature

public void mute(String uuid)

Parameters

ParameterTypeDescription

uuid

String

The UUID of the player to be muted.

Usage

To use the mute method in your plugin, you need to import the MelodyManager class and use its instance to call the method. Here is an example:

import ir.taher7.melodymine.core.MelodyManager;

public class YourPluginClass {
    public void someMethod() {
        // Get the instance of MelodyManager
        MelodyManager melodyManager = MelodyManager.INSTANCE;

        // Get the UUID of the player to be muted
        String playerUUID = "player-uuid-goes-here";

        // Mute the player
        melodyManager.mute(playerUUID);

        // Print a message to the console
        Bukkit.getLogger().info("Player with UUID " + playerUUID + " has been muted.");
    }
}

Make sure to replace "player-uuid-goes-here" with the actual UUID of the player you want to mute.

Last updated