Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

lukeeey/DiscordRelay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

25 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

image

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

Features

  • Two-way chat between Discord and Minecraft
  • Display messages in Discord (optionally in embeds) for common events like player joins or deaths
  • Role ping protection from Minecraft
  • Simple Developer API for creating new Discord commands
  • Built-in !playerlist, !serverinfo and !playerinfo <name> Discord commands!
  • Built-in /discord in-game command so players can see info about your Discord server
  • Automatic updating of the relay channel topic in Discord!
    ...and more!

And best of all, everything is configurable!

TODO

  • Allow the execution of Minecraft commands from Discord

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!