Git Product home page Git Product logo

mcdc's Introduction

Hi there 👋

MaFeLP's GitHub stats

Top Langs

mcdc's People

Contributors

dependabot[bot] avatar mafelp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mcdc's Issues

[minecraft]: No error on CommandnotFinishedException

Description

When using command config in the console or as a player and having a non even amount of " or ' in the command, an error would occur and the player would not get an error message, just that he used the command wrong.

Expected behavior

Sending the Player a message, that explains what he/she has done wrong.

Steps to reproduce

  1. Download the latest release.
  2. Start the server with the plugin enabled.
  3. execute the command:
config set test "foo " bar"

in the console, or the following as a player

/config set test "foo "bar"

Environment

  • Linux 5.111.13
  • OpenJDK Runtime Environment (build 15.0.2+7)
  • Minecraft version 1.16.5
    • Paper version 582

[minecraft]: config command only requires OP

Description

When executing the config command, the code only checks if the user is OP, not checking the config file.

Expected behavior

The function should check if the commandSender is the console or has the required OP level, specified in the config file or has a wildcard, specified in permission.configEdit.allowedUserUUIDs.

Steps to reproduce

  1. Get version the latest beta version.
  2. Build the plugin and start the server.

Environment

  • Linux 5.111.13
  • OpenJDK Runtime Environment (build 15.0.2+7)
  • Minecraft version 1.16.5
    • Paper version 582

Join/Leave, Start/Stop, Death, and Advancement messages.

This is a really good plugin for my server, as it doesn't rely on webhooks like others do, so it works well with my Matrix bridge. It would be completely usable if Join/Leave, Start/Stop, Death, and Advancement messages where also sent to discord.

[DC] Whisper command lets you only whisper to yourself

As discord only allows selecting users that can see the channel of a slash command, it is currently only possible to whisper to yourself and the bot. This is, because the whisper command is disabled on server channels. You can only use this command in private channels with the bot, which only you and the bot can see. Therefore, only you and the bot can be whispered to.

[account]: Add linking of accounts

What should it do:

The linking of accounts should enable you to link your minecraft and discord account together to enable cross-platform whispering in the future.
See #34 for more information.

[discord]: Add permission required for inviting the bot

Description

Discord invitation links can have a parameter which determines which permissions the bot needs. currently this bot has Permissions=0, but it would either need 8 or 335998161.

Examples:

Current:

https://discord.com/oauth2/authorize?client_id=1234567890&scope=bot&permissions=0

New:

https://discord.com/oauth2/authorize?client_id=1234567890&scope=bot&permissions=335998161

[minecraft]: /token only requires OP

Description

When executing the token command, the plugin only checks if the user is OP.

Expected behavior

The function should check if the commandSender is the console or has the required OP level, specified in the config file or has a wildcard, specified in permission.configEdit.allowedUserUUIDs.

Steps to reproduce

  1. Get version the latest pre-release.
  2. Start the server with the plugin enabled.
  3. Execute the command /token asdf as user with OP, but not defined in the config.

Environment

  • Linux 5.11.13
  • OpenJDK Runtime Environment (build 15.0.2+7)
  • Minecraft version 1.16.5
    • Paper version 582

[minecraft]: Have " in the arguments of a command

Description

Using the command

/config set test "foo \"bar"

should set the config value to the following:

test: 'foo "bar'

Also using different types of quotation marks should not interfere with one another:

/config set test 'foo "bar"'

should be treated as: subcommand: set; arguments: [test, foo "bar"]


Currently it throws an error, that is not shown to the user.
See #24 .

[minecraft]: long message: format error in console

Description

When sending a message in the discord chat, the prefix would appear as two question marks.

Steps to reproduce

  1. Get version the latest release
  2. Start the server
  3. Set the option useShortMessageFormat to true by editing the configuration file and reload the config with the minecraft-console-command
config reload

or set the config value by executing the commands in the minecraft console

config set useShortMessageFormat true
config save
config reload
  1. Write a message into a discord channel.

Environment

  • Linux 5.111.13
  • OpenJDK Runtime Environment (build 15.0.2+7)
  • Minecraft version 1.16.5
    • Paper version 582

.setup: Success embed not showing role

Description

The embed sent to the channel after using command .setup "foo bar" does not contain a mention to the newly created role.

Steps to reproduce

  1. Get version v0.8.1-beta
  2. Build the project and load the plugin.
  3. In a discord channel with the bot having read/write and channel-/role creation rights, use command .setup "foo bar"

[discord]: BadRequestException

Description

Executing command .setup "" throws a BadRequestException because the server cannot create a channel with an empty name.

Steps to reproduce

  1. Get version 0.8.2-beta
  2. Build the plugin and use start the server

Environment

  • Linux 5.111.13
  • OpenJDK Runtime Environment (build 15.0.2+7)
  • Minecraft version 1.16.5
    • Paper version 582

[minecraft]: IllegalArgumentException

Description

Executing command config set "" "" throws a CommandException caused by an IllegalArgumentException

Steps to reproduce

  1. Get version 0.8.2-beta
  2. Build the plugin and use start the server

Environment

  • Linux 5.111.13
  • OpenJDK Runtime Environment (build 15.0.2+7)
  • Minecraft version 1.16.5
    • Paper version 582

/config set

Description

  • Using /config set test "hello world" would throw an error and refuse to work.
  • Using /config set test foo would work.

Steps to reproduce

  1. Get version 0.8.1-beta
  2. Build the version and execute the command /config set test "foo bar" as player or config set test "foo bar" in the console.

[discord]: Uncatched exception on lacking channel craetion permission.

Description

When using the .setup command, the bot does not give you an error message.

Console error:

[11:49:22 ERROR]: [org.javacord.core.util.event.EventDispatcherBase] Unhandled exception in a listener thread for MCDC Tutorial!
java.util.concurrent.CompletionException: org.javacord.api.exception.MissingPermissionsException: Received a 403 response from Discord with body {"message": "Missing Permissions", "code": 50013}!
        at java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:412) ~[?:?]
        at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2108) ~[?:?]
        at com.github.mafelp.discord.RoleAdmin.createNewRole(RoleAdmin.java:70) ~[?:?]
        at com.github.mafelp.discord.commands.SetupListener.onMessageCreate(SetupListener.java:141) ~[?:?]
        at org.javacord.core.util.event.EventDispatcher.lambda$dispatchMessageCreateEvent$104(EventDispatcher.java:3705) ~[?:?]
        at org.javacord.core.util.event.EventDispatcherBase.lambda$dispatchEvent$10(EventDispatcherBase.java:197) ~[?:?]
        at org.javacord.core.util.event.EventDispatcherBase.lambda$checkRunningListenersAndStartIfPossible$17(EventDispatcherBase.java:265) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?]
        at java.lang.Thread.run(Thread.java:832) [?:?]
Caused by: org.javacord.api.exception.MissingPermissionsException: Received a 403 response from Discord with body {"message": "Missing Permissions", "code": 50013}!
        at org.javacord.core.util.rest.RestRequestHttpResponseCode.lambda$getDiscordException$2(RestRequestHttpResponseCode.java:224) ~[?:?]
        at java.util.Optional.map(Optional.java:258) ~[?:?]
        at org.javacord.core.util.rest.RestRequestHttpResponseCode.getDiscordException(RestRequestHttpResponseCode.java:224) ~[?:?]
        at org.javacord.core.util.rest.RestRequest.lambda$executeBlocking$11(RestRequest.java:395) ~[?:?]
        at java.util.Optional.flatMap(Optional.java:287) ~[?:?]
        at org.javacord.core.util.rest.RestRequest.executeBlocking(RestRequest.java:394) ~[?:?]
        at org.javacord.core.util.ratelimit.RatelimitManager.lambda$queueRequest$2(RatelimitManager.java:114) ~[?:?]
        ... 5 more
Caused by: java.lang.Exception: origin of RestRequest call
        at org.javacord.core.util.rest.RestRequest.<init>(RestRequest.java:75) ~[?:?]
        at org.javacord.core.entity.permission.RoleBuilderDelegateImpl.create(RoleBuilderDelegateImpl.java:109) ~[?:?]
        at org.javacord.api.entity.permission.RoleBuilder.create(RoleBuilder.java:104) ~[?:?]
        ... 10 more

Expected behavior

Try sending the user a help embed, informing him about missing permissions. If this does not work, send a meaningful message to the console.

Steps to reproduce

  1. Follow the installation guide
  2. Don't grant the bot any permissions!
  3. Execute command .setup "test" in the discord channel.

Environment

  • Linux 5.11.14
  • OpenJDK Runtime Environment (build 15.0.2+7)
  • Minecraft version 1.16.5
    • Paper version 582

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.