enableAdminMode()
enableAdminMode Method in MelodyManager Class
enableAdminMode Method in MelodyManager ClassMethod Signature
public void enableAdminMode(String uuid)Parameters
Parameter
Type
Description
uuid
String
The unique identifier of the player for whom the admin mode is to be enabled.
Usage
To use this method in other plugins, you need to import the MelodyManager class and call the enableAdminMode method on its instance. Here is an example:
import ir.taher7.melodymine.core.MelodyManager;
public class ExamplePlugin {
public void enableAdminForPlayer(String uuid) {
MelodyManager.INSTANCE.enableAdminMode(uuid);
Bukkit.getLogger().info("Admin mode enabled for player with UUID: " + uuid);
}
}In the above example, we have a method enableAdminForPlayer in our ExamplePlugin class. This method takes a player's UUID as a parameter and enables the admin mode for that player using the enableAdminMode method from MelodyManager. It then logs a message to the console indicating that the admin mode has been enabled for the player.
Make sure that the UUID passed to the enableAdminMode method is valid and corresponds to a player in the server. Invalid UUIDs will not have any effect.
Last updated