A plugin for relaying chat between Discord and Minecraft.
!playerlist
, !serverinfo
and !playerinfo <name>
Discord commands!/discord
in-game command so players can see info about your Discord server And best of all, everything is configurable!
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!