sendStartLink()

The sendStartLink method is a part of the MelodyManager class in the MelodyMine plugin. This method is used to send a start link to a player.

Method Signature

public void sendStartLink(Player player)

Parameters

Parameter
Type
Description

player

Player

The player to whom the start link is to be sent.

Usage

To use this method in another plugin, you need to import the MelodyManager class and call the sendStartLink method on its instance. Here is an example:

import ir.taher7.melodymine.core.MelodyManager;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class ExamplePlugin extends JavaPlugin {

    @Override
    public void onEnable() {
        Player player = getServer().getPlayer("playerName");
        if (player != null) {
            MelodyManager.INSTANCE.sendStartLink(player);
            getLogger().info("Start link sent to the player.");
        }
    }
}

Make sure the player is online before calling this method, as it requires an active Player object. If the player is offline, this method will not work as expected.

Last updated