Commands are registering but the executes is not working.
See original GitHub issueCommandAPI 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:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Can confirm that something’s not quite right. Will investigate ASAP.
Ah yes, I’ve just test without the commands section. It worked, thanks.