question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Commands are registering but the executes is not working.

See original GitHub issue

CommandAPI version 5.10

Minecraft version 1.16.5

Describe the bug

  • Basically doesn’t work at all.
  • I’m using the library with shading.
  • I used onLoad() and onEnable() methods on the methods where are described on the documentation.
  • I registered after calling the onLoad method.
  • Also, I tried to register after the onEnable method, nothing changed.

My code This code reproduces the behavior:

new CommandAPICommand("entitylimiter")
  .withPermission("entitylimiter.command.main")
  .executes((sender, objects) -> {
    sender.sendMessage(this.getVersionMessage());
  })
  .withSubcommand(new CommandAPICommand("reload")
    .withPermission("entitylimiter.command.reload")
    .executes((sender, objects) -> {
      EntityLimiterConfig.load(this.plugin, true).whenComplete((configLoader, throwable) ->
        sender.sendMessage(this.getReloadCompleteMessage()));
    }))
  .register();

Expected behavior

  • Command’s executes should execute.
  • Command’s suggestions(a.k.a. tab complete) should work.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
JorelAlicommented, May 1, 2021

Can confirm that something’s not quite right. Will investigate ASAP.

0reactions
portlekcommented, May 1, 2021

Ah yes, I’ve just test without the commands section. It worked, thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

discord.js - Commands not running with no error message
im trying to run multiple commands for my discord bot, bot for some reason one singular command is not running.
Read more >
Implement Slash commands · Issue #712 - GitHub
Summary. Implement slash commands as per Discord docs. Details. Implement registering a command; Implement updating and deleting a command.
Read more >
How to use the Regsvr32 tool and ... - Microsoft Support
Regsvr32 is a command-line utility to register and unregister OLE controls, such as DLLs and ActiveX controls in the Windows Registry.
Read more >
How to fix a "Command not found" error in Linux - Red Hat
Learn five ways to deal with a "Command not found" error, ... It's frequently used when running commands to find the command executable....
Read more >
Command handling - discord.js Guide
Unless your bot project is small, it's not a very good idea to have a single ... content: 'There was an error while...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found