mcspring-boot
mcspring-boot copied to clipboard
DispatchCommand doesn't work properly
Using Bukkit.dispatchCommand(sender, cmd)
doesn't seem to work properly with picocli. The command is fired, because I don't get the text that I entered an unknown command, but the run()
method did not get executed.
Also I know that you have a command executor bean, but if another plugin want to call these commands, they will be unable to do so, since they aren't using mcspring-boot.
This is probably caused by the native command registration. In the case of a unexpected exception, it will fallback to event listeners, causing it to not work with dispatchCommand
. mcpsring-boot already keeps track of that in a log in debug
level, I raised it to warn
in 0.20.7:
https://github.com/Alan-Gomes/mcspring-boot/blob/6e657cadb35e08d5b3a366ac9cbfbde5826ea4bd/src/main/java/dev/alangomes/springspigot/command/CommandService.java#L67-L80
Please let me know if this reports something in your console.