lukeeey / DiscordRelay

🎉 A full-featured chat bridge between Discord and Minecraft!
https://www.spigotmc.org/resources/discordrelay.90263/
GNU General Public License v3.0
1 stars 0 forks source link
bukkit-plugin discord-bot minecraft nukkit-plugin

image

DiscordRelay Discord
A plugin for relaying chat between Discord and Minecraft.

Features

And best of all, everything is configurable!

TODO

For Developers

You can register your own Discord command and also send your own messages to the Discord relay channel.

Registering a command

public class HelloWorldCommand extends DiscordCommand {

    public HelloWorldCommand() {
        super("helloworld", "Says \"Hello, world!\"");
    }

    @Override
    public void execute(Member sender, TextChannel channel, String message) {
        channel.sendMessage("Hello, world!").queue();
    }
}

In your onEnable simply add something like

DiscordRelayPlugin discordRelay = getServer().getPluginManager().getPlugin("DiscordRelay");
discordRelay.registerDiscordCommand(new HelloWorldCommand());

When typing !helloworld the bot will send a message saying Hello, world!