Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prettier CommandTree formatting for help command and usage hint #48

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

user622628252416
Copy link

As discussed in #39

Current limitations: Help for commands with more than one branch ends after that branch. Vanilla Minecraft does that, too, but also allows displaying help for a specific branch if that branch is specified in the help command, which this pr does not implement.

@Snowiiii Snowiiii added the enhancement New feature or request label Aug 21, 2024
@Snowiiii
Copy link
Owner

Hey, Just tested it, Good work!. But i would still like to not display mutliple same commands in new lines. Like here
image
Help could be replaced with for example:
help/h/?.
So its in one line

@user622628252416
Copy link
Author

Done 👍

It now looks like this

h
2024-08-21T17:26:19.239Z INFO  [pumpkin::commands] Text { text: "gamemode - Change a player's gamemode. Usage: /gamemode <gamemode> [<target>]" }
2024-08-21T17:26:19.239Z INFO  [pumpkin::commands] Text { text: "help/h/? - Print a help message. Usage: /help [<command>]" }
2024-08-21T17:26:19.239Z INFO  [pumpkin::commands] Text { text: "pumpkin - Display information about Pumpkin. Usage: /pumpkin" }
2024-08-21T17:26:19.239Z INFO  [pumpkin::commands] Text { text: "stop - Stop the server. Usage: /stop" }

@Snowiiii
Copy link
Owner

Done 👍

It now looks like this

h
2024-08-21T17:26:19.239Z INFO  [pumpkin::commands] Text { text: "gamemode - Change a player's gamemode. Usage: /gamemode <gamemode> [<target>]" }
2024-08-21T17:26:19.239Z INFO  [pumpkin::commands] Text { text: "help/h/? - Print a help message. Usage: /help [<command>]" }
2024-08-21T17:26:19.239Z INFO  [pumpkin::commands] Text { text: "pumpkin - Display information about Pumpkin. Usage: /pumpkin" }
2024-08-21T17:26:19.239Z INFO  [pumpkin::commands] Text { text: "stop - Stop the server. Usage: /stop" }

Much better, Thank you again 👍

@Snowiiii Snowiiii merged commit bda7a1a into Snowiiii:master Aug 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants