/DiscordRankSync

Link your Discord ⭕ Lightweight ✅ Mongo SQL Yaml ✨ Developer API

Primary LanguageJavaMIT LicenseMIT

Contributors Forks Stargazers Issues MIT License

Discord Rank Sync

Lightweight discord integration to synchronize ranks and reward your donors!
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Installation
  3. Commands
  4. Developer API
  5. License
  6. Contact

About The Project

Extremely lightweight plugin to synchronize in-game ranks with Discord roles! It also allows cross-platform chatting between Discord and Minecraft!

Here's why you should use this plugin:

  • Lightweight & Optimized
  • Easy setup; Drag & Drop (Set up your discord bot, and you are ready to go!)
  • Multiple database options: YAML, MongoDB, MySQL
  • Developer API in case you want to implement this in your plugins!
  • Extremely and easily configurable

(back to top)

Installation

This shows how you install the plugin.

  1. Create an application at https://discord.com/developers/applications
  2. Create a bot within the application and copy the bot token
  3. Click OAuth2 > URL Generator
  4. Check applications.commands & bot under Scopes
  5. Check whichever permissions your bot will require under Bot Permissions
  6. Copy the Generated URL and invite the bot to your discord server
  7. Drop this plugin in your ./plugins folder
  8. Once the config.yml is created, insert the bot token which you have copied and restart the server
  9. Join the server and start linking your account with /discord link!

(back to top)

Commands

This is a list of commands available in the plugin and their respective permissions required.

Command Description Permission
/discord Displays the Discord server's invite link None
/discord help Displays the command help menu in game None
/discord link Generates a code for you to link with your Discord account None
/discord unlink Unlinks with your Discord account None
/discord chat Toggles your Discord / Minecraft chat None
/discord whois <player> Displays the target's Discord user information None
/discord reload Reloads the plugin configuration drs.reload
/discord update Force update roles of online players drs.update

(back to top)

Developer API

This section is for developers who want to make use of this plugin's API.

API

package net.evilkingdom.discordranksync.api;

import org.bukkit.OfflinePlayer;

import javax.annotation.Nullable;

public interface DiscordRankSyncAPI {

    /**
     * Returns whether player is linked with a discord user
     *
     * @param player ~ The player to check if its linked
     * @return ~ Returns true if the player is linked with a discord user else false
     */
    boolean isLinked(OfflinePlayer player);

    /**
     * Get the discord ID of a player, if the player is linked
     *
     * @param player ~ The player to query for its discord ID
     * @return ~ Returns the discord ID as a string if the player is linked, else null
     */
    @Nullable
    String getDiscordId(OfflinePlayer player);
}

To get the API implementation:

DiscordRankSyncAPI api =  ((DiscordRankSync) Bukkit.getPluginManager().getPlugin("DiscordRankSync")).getInstance().getApi();

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

TheTrustyPwo - Pwo#0001 - thetrustypwo@gmail.com

Project Link: https://github.com/EvilKingdom/DiscordRankSync

(back to top)