Minecraft Discord Chat
A Spigot plugin with a focus on Discord integration.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
About The Project
This Spigot server plugin unifies the world of Minecraft with the complexities of a Discord server. Users can create areas in specific Minecraft servers that link to a Discord voice channel. When players enter a new area in-game, they are moved to the corresponding voice channel and return to the default voice channel after exiting. In addition, user’s chat messages in Minecraft are redirected to a discord text channel and vice versa. This allows for a more immersive and seamless experience for users of the server.
Version 1.0.0 of this plugin was created during the 2022 Gonzaga University Hackathon and was written in less than 12 hours. It did not earn any awards but most of the competitors thought it was a super cool idea.
Getting Started
To get a local copy up and running follow these simple example steps.
Prerequisites
- Java 17
- Gradle (from source)
- Minecraft 1.19+
Installation
-
Set up a Discord Bot at https://discord.com/developers/applications and invite it to your server. Save your tokenID from the api to put in the config file.
-
Create a spigot server. This can be done by running the following bash commands or by downloading the server from https://www.spigotmc.org/
mkdir -p minecraft_server/build cd minecraft_server/build curl https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -o BuildTools.jar java -jar BuildTools.jar mv spigot-*.jar ../spigot.jar cd .. rm -rf build echo eula=true > eula.txt
-
Either clone this repo and build from source or download the latest release from Releases
-
Place this file in
minecraft_server/plugins/
and openminecraft_server/plugins/MinecraftDiscordChat/config.yml
and fill in the required fields:api_token: "YOUR_Discord_BOT_TOKEN" default_category_name: "The name of the Discord category to use" default_server_id: "The server ID of the Discord server to use" # The following are optional default_text_channel_id: "The default text channel ID to use" default_voice_channel_id: "The default voice channel ID to use"
-
Run your minecraft server by running
java -jar spigot.jar
inminecraft_server/
and join the voice channel you specified in the config file. You should see a message in the console saying that the plugin has been enabled.
Build From Source
-
Clone the repo
git clone https://github.com/CameronSWilliamson/MinecraftDiscordChat.git
-
Build the jar file
make compile
-
Copy the jar file to your minecraft server
cp build/libs/MinecraftDiscordChat.jar /path/to/minecraft/server/plugins/
Usage
Getting started with the plugin is easy.
- Join the minecraft server and run
/discord <username>#<numbers>
to link your minecraft username to your Discord username. - In the Minecraft server you can run
/createvoice <area name>
to recieve a stick named"AreaDefiner <area name>"
. Right click in one corner of the area you want to define as a voice area and then right click in the opposite corner. This will create a voice area with the name you specified linked to a new voice channel in Discord that players will be moved to when they enter the voice area. - In the Minecraft server you can run
/deletevoice <area name>
to delete the voice area with the name you specified. - In the Minecraft server you can also run
/request <feature/bug>
to request a feature or report a bug. This will send a mesage to the developer of the plugin on Discord.
Contributing
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch off of the
dev
branch (git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Dev Tools
Many development tools are included in the Makefile
to make development easier. These include:
make compile
- Compiles the plugin into a jar filemake clean
- Cleans the build directory and removes the test servermake spigot
- Downloads the latest spigot server jar file and runs spigot build toolsmake run
- Runs the plugin in a test servermake doc
- Generates javadoc for the pluginmake rmdb
- Removes the database file for the test servermake cleanrun
- Cleans the build directory, removes the test server, and runs the plugin in a test server
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Cameron Williamson - @therealkeyisme - therealkey@outlook.com
Project Link: https://github.com/CameronSWilliamson/MinecraftDiscordChat