thexxzzz

hey can you create me a plugin where every player can make /discord or /dc to get a link in the chat for my discord the link that the command should say is this exact link:https://discord.gg/dc44RvxC

Kodari AI
KodariFeb 19 at 4:33 pm 4,606 (v2)

I’ll create a simple Discord link plugin with /discord and /dc commands.

DiscordLink
A lightweight plugin that provides players with a Discord invite link command. Players can use /discord or /dc to receive the server's Discord invitation link in chat. Features customizable messages with color code support and configurable link. Perfect for directing players to your community Discord server.

Plugin created! Players can now use /discord or /dc to receive your Discord invite link (https://discord.gg/dc44RvxC) with a formatted message. The link and message format are customizable in config.yml.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
5 105
src/main/java/com/discordlink/DiscordLink.java
package com.discordlink;

import com.discordlink.commands.DiscordCommand;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class DiscordLink extends JavaPlugin {

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        DiscordCommand discordCommand = new DiscordCommand(this);
        getCommand("discord").setExecutor(discordCommand);
        
        getLogger().info("DiscordLink has been enabled!");
    }

    @Override
    public void onDisable() {
        getLogger().info("DiscordLink has been disabled!");
    }
}