[feature] Request to add "command execution result" to the return value of "Server.dispatch_command"
This feature is requested to facilitate the writing of the Endstone's plugin.
A new return value should be added to "Server.dispatch_command" for the execution result of the original Minecraft command.
Season:
I'm writing a backup plugin, but the key part of it needs to be the "result of the command".
For example, need to get the result of this command
/save query (After /save hold)
Return in the console:
save query
[2024-08-01 22:39:18.021 INFO] [Server] Data saved. Files are now ready to be copied.
[2024-08-01 22:39:18.021 INFO] [Server] YiXiu-YX/db/000016.ldb:692, YiXiu-YX/db/000017.log:2704, YiXiu-YX/db/000018.ldb:833, YiXiu-YX/db/CURRENT:16, YiXiu-YX/db/MANIFEST-000013:420, YiXiu-YX/level.dat:2849, YiXiu-YX/level.dat_old:2849, YiXiu-YX/levelname.txt:8
OwO Please.
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Endstone, please open a new issue and link this to it. Thanks!
A new class named CommandSenderWrapper is added in commit https://github.com/EndstoneMC/endstone/commit/3ff6d42109819f34070ec43650df55bda44ed395 for this purpose. You can now wrap the actual command sender with this class and get the output by setting the on message and on error callbacks.