Git Product home page Git Product logo

ranksync's Introduction

RankSync

This plugin has been made to give people an easy option to synchronize ranks between Minecraft and Discord. This simplifies for example purging staffmembers, giving donators their ranks on Discord.

Please note that the ranks will be given on Discord, based on the Minecraft ranks, NOT THE OTHER WAY AROUND. People will only get their rank on Discord when the ranks they have are included in the config.yml.

Support

Data

To store the data, right now we support the following ways of store:

  • MySQL
  • Yaml

more ways to store data might get added in the future.

Spigot

Right now RankSync supports the following permission systems:

  • Vault
  • LuckPerms

they will be detected automatically when your server runs one of these two plugins.

Bungeecord

Right now RankSync supports the following permission systems:

  • LuckPerms

it will be detected automatically when your server runs this plugin.

Prerequisites

Those are the things you'll need if you want to compile this project for yourself

  • Maven
  • Git
  • JDK 8+

License

This project is licensed under the MIT license - see the LICENSE file for details.

ranksync's People

Contributors

chickenpowerrr avatar drynael avatar martijnviterson avatar maximemichaud avatar thom-de-m avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ranksync's Issues

config.yml keeps getting reset

Describe the bug
Everytime I modify the config.yml file, it gets reset at start, and log says that the token is incorrect, even though it keeps resetting it.

To Reproduce
Steps to reproduce the behavior:

  1. Set the token and guild id to what they are supposed to be
  2. If not done on server, overwrite the old file with the new one
  3. Start the server
  4. See error

Expected behavior
I expect it to keep config.yml how I set it

Screenshots
If applicable, add screenshots to help explain your problem.

Server (please complete the following information):

  • Plugin version: 1.4.0
  • MySQL version: Not used?
  • Spigot version: 1.15.2
  • Server is run in a Docker container, but that shouldn't affect it.

Additional context
Resets the entire file, not just the ID and token.

Name sync

Is your feature request related to a problem? Please describe.

Describe the solution you'd like
I would like a function to sync names from Minecraft to Discord and set discord names to ingame names automatically.

Describe alternatives you've considered
wasn't able to find any.

Additional context

Messages send twice

Describe the bug
The bot send messages twice.

To Reproduce
Steps to reproduce the behavior:

  1. Go on Discord channel
  2. Send !link
  3. The bot send the message twice (in channel and in private messages)

Expected behavior
The bot should send the message just once.

Screenshots
N/A

Server (please complete the following information):

  • Plugin version : 1.4.0
  • MySQL version : 5.7.29-0ubuntu0.18.04.1
  • Spigot version latest 1.14.4

Additional context
N/A

Missing Maven dependency: Language Helper

When trying to build the latest version, the following error occurs:

[WARNING] The POM for com.gmail.chickenpowerrr:languagehelper:jar:0.0.3 is missing, no dependency information available

This is because language helper is (as far as I know) not available on a maven repo. Currently, the only way to obtain this dependency is by cloning the github repo and building it locally, in order to get it on maven local. I suggest you publish it on maven central or on a third party maven repo, to make the build process easier and more friendly, specially for CI/CD systems.

Console Error on startup

Describe the bug
Error in Console (Is it up to date?)

To Reproduce
Steps to reproduce the behavior:

  1. Start the server
  2. See error

Expected behavior
A clear and concise description of what you expected to happen.
No errors in Console

Screenshots
If applicable, add screenshots to help explain your problem.
Error : https://pastebin.com/rre2PMWz

Server (please complete the following information):

  • Plugin version 1.2.0
  • Spigot version [e.g. 1.13.2]

Add a reload command

Is your feature request related to a problem? Please describe.
Add a reload command

Describe the solution you'd like
Everything in the title

Describe alternatives you've considered
Restart the server.

Additional context
N/A

Legacy Plugin _ API-Version is missing

Hello, is there a way to get rid of this message?
I know it's not a bug, but is there a way to add the api version by myself just to clean up the console?

image

Bungeecord

Hello, I have luckperms on my bungeecord proxy but those ranks are mainly for staff ranks. I use luck perms separately on each server but would like all ranks from every server to be integrated into discord with the command /sync so how would I go about doing that without having the player enter that command on each and every server.

2 things

  1. Discord invite link on Spigot is invalid
  2. Does it synchronize Discord roles to Minecraft ranks?

java.lang.IllegalStateException: zip file closed

Describe the bug

[13:45:58 ERROR]: java.util.concurrent.CompletionException: java.lang.IllegalStateException: zip file closed
[13:45:58 ERROR]:       at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
[13:45:58 ERROR]:       at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
[13:45:58 ERROR]:       at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
[13:45:58 ERROR]:       at java.base/java.lang.Thread.run(Thread.java:833)
[13:45:58 ERROR]: Caused by: java.lang.IllegalStateException: zip file closed
[13:45:58 ERROR]:       at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:831)
[13:45:58 ERROR]:       at java.base/java.util.zip.ZipFile.getEntry(ZipFile.java:330)
[13:45:58 ERROR]:       at java.base/java.util.jar.JarFile.getEntry(JarFile.java:518)
[13:45:58 ERROR]:       at java.base/java.util.jar.JarFile.getJarEntry(JarFile.java:473)
[13:45:58 ERROR]:       at net.md_5.bungee.api.plugin.PluginClassloader.findClass(PluginClassloader.java:110)
[13:45:58 ERROR]:       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
[13:45:58 ERROR]:       at net.md_5.bungee.api.plugin.PluginClassloader.loadClass0(PluginClassloader.java:66)
[13:45:58 ERROR]:       at net.md_5.bungee.api.plugin.PluginClassloader.loadClass(PluginClassloader.java:59)
[13:45:58 ERROR]:       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
[13:45:58 ERROR]:       at com.gmail.chickenpowerrr.ranksync.discord.player.PlayerFactory.lambda$getPlayer$4(PlayerFactory.java:113)
[13:45:58 ERROR]:       at com.gmail.chickenpowerrr.ranksync.discord.data.SqlDatabase.lambda$getPlayer$2(SqlDatabase.java:157)
[13:45:58 ERROR]:       at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[13:45:58 ERROR]:       ... 1 more
[13:45:58 ERROR]: java.util.concurrent.CompletionException: java.lang.IllegalStateException: zip file closed
[13:45:58 ERROR]:       at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
[13:45:58 ERROR]:       at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
[13:45:58 ERROR]:       at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
[13:45:58 ERROR]:       at java.base/java.lang.Thread.run(Thread.java:833)
[13:45:58 ERROR]: Caused by: java.lang.IllegalStateException: zip file closed
[13:45:58 ERROR]:       at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:831)
[13:45:58 ERROR]:       at java.base/java.util.zip.ZipFile.getEntry(ZipFile.java:330)
[13:45:58 ERROR]:       at java.base/java.util.jar.JarFile.getEntry(JarFile.java:518)
[13:45:58 ERROR]:       at java.base/java.util.jar.JarFile.getJarEntry(JarFile.java:473)
[13:45:58 ERROR]:       at net.md_5.bungee.api.plugin.PluginClassloader.findClass(PluginClassloader.java:110)
[13:45:58 ERROR]:       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
[13:45:58 ERROR]:       at net.md_5.bungee.api.plugin.PluginClassloader.loadClass0(PluginClassloader.java:66)
[13:45:58 ERROR]:       at net.md_5.bungee.api.plugin.PluginClassloader.loadClass(PluginClassloader.java:59)
[13:45:58 ERROR]:       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
[13:45:58 ERROR]:       at com.gmail.chickenpowerrr.ranksync.discord.player.PlayerFactory.lambda$getPlayer$4(PlayerFactory.java:113)
[13:45:58 ERROR]:       at com.gmail.chickenpowerrr.ranksync.discord.data.SqlDatabase.lambda$getPlayer$2(SqlDatabase.java:154)
[13:45:58 ERROR]:       at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[13:45:58 ERROR]:       ... 1 more
[13:45:58 ERROR]: java.util.concurrent.CompletionException: java.lang.IllegalStateException: zip file closed
[13:45:58 ERROR]:       at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
[13:45:58 ERROR]:       at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
[13:45:58 ERROR]:       at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
[13:45:58 ERROR]:       at java.base/java.lang.Thread.run(Thread.java:833)
[13:45:58 ERROR]: Caused by: java.lang.IllegalStateException: zip file closed
[13:45:58 ERROR]:       at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:831)
[13:45:58 ERROR]:       at java.base/java.util.zip.ZipFile.getEntry(ZipFile.java:330)
[13:45:58 ERROR]:       at java.base/java.util.jar.JarFile.getEntry(JarFile.java:518)
[13:45:58 ERROR]:       at java.base/java.util.jar.JarFile.getJarEntry(JarFile.java:473)
[13:45:58 ERROR]:       at net.md_5.bungee.api.plugin.PluginClassloader.findClass(PluginClassloader.java:110)
[13:45:58 ERROR]:       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
[13:45:58 ERROR]:       at net.md_5.bungee.api.plugin.PluginClassloader.loadClass0(PluginClassloader.java:66)
[13:45:58 ERROR]:       at net.md_5.bungee.api.plugin.PluginClassloader.loadClass(PluginClassloader.java:59)
[13:45:58 ERROR]:       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
[13:45:58 ERROR]:       at com.gmail.chickenpowerrr.ranksync.discord.player.PlayerFactory.lambda$getPlayer$4(PlayerFactory.java:113)
[13:45:58 ERROR]:       at com.gmail.chickenpowerrr.ranksync.discord.data.SqlDatabase.lambda$getPlayer$2(SqlDatabase.java:154)
[13:45:58 ERROR]:       at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[13:45:58 ERROR]:       ... 1 more

After installing RankSync on Bungeecord, the error above shows every now and then. Every once in a while a player also gets kicked when this error occurs.

To Reproduce

  1. Install RankSync 1.4.2 on Waterfall build #504.
  2. Setup a basic configuration.
  3. Allow your devs to try and link their account.

Server (please complete the following information):

  • Plugin version: 1.4.2
  • MySQL version: 10.3.18-MariaDB
  • Spigot version: Waterfall (Bungeecord) build 504
  • Other (for this problem) relevant information

use role id

Would it be possible to switch from role name to role id on the discord side? that would minimize problems with special characters in role names

Erro

[19:30:45 WARN]: java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Illegal group reference
[19:30:45 WARN]: at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
[19:30:45 WARN]: at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
[19:30:45 WARN]: at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:673)
[19:30:45 WARN]: at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:646)
[19:30:45 WARN]: at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
[19:30:45 WARN]: at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1609)
[19:30:45 WARN]: at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1596)
[19:30:45 WARN]: at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
[19:30:45 WARN]: at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
[19:30:45 WARN]: at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
[19:30:45 WARN]: at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)
[19:30:45 WARN]: Caused by: java.lang.IllegalArgumentException: Illegal group reference
[19:30:45 WARN]: at java.util.regex.Matcher.appendReplacement(Matcher.java:857)
[19:30:45 WARN]: at java.util.regex.Matcher.replaceAll(Matcher.java:955)
[19:30:45 WARN]: at java.lang.String.replaceAll(String.java:2223)
[19:30:45 WARN]: at com.gmail.chickenpowerrr.ranksync.discord.language.Translation.getTranslation(Translation.java:45)
[19:30:45 WARN]: at com.gmail.chickenpowerrr.ranksync.discord.command.LinkCommand.execute(LinkCommand.java:84)
[19:30:45 WARN]: at com.gmail.chickenpowerrr.ranksync.discord.event.DiscordEventListeners.lambda$onEvent$3(DiscordEventListeners.java:89)
[19:30:45 WARN]: at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:670)
[19:30:45 WARN]: ... 8 more

Discord members with names that contain special characters and use !Link receive only the message discord-link-command-rightthere and return this error on the console.

No documentation

No documentations to be found, not even the API has documentation.

Use discord's ephemeral messages instead of direct messages

Is your feature request related to a problem? Please describe.
Currently, users need to enable private messges in order to recieve their code.

Describe the solution you'd like
The bot could make use of discord's ephemeral messages.

Describe alternatives you've considered
Revert the link flow, the user would recieve the code via Minecraft instead of Discord. This would be harder to implement.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.