Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Introduce command trees; improve Commandessentials#5384

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
mdcfe wants to merge10 commits into2.x
base:2.x
Choose a base branch
Loading
fromfeature/improve-ess-command

Conversation

@mdcfe
Copy link
Member

@mdcfemdcfe commentedJun 7, 2023
edited
Loading

Information

This PR closes an internal goal.

Details

Proposed feature:

This implements two separate features (may be split into separate PRs later down the line):

  • Introduce command trees, which allow for nested subcommands to be declared and parsed effectively.
    • Goals: lightweight, incrementally adoptable across new and existing commands as necessary
    • Trees consist of a root node, literal nodes and execute nodes
    • No parsing of argument types is implemented at present
    • Possibly worth exploring cloud/another tree command lib instead of rolling our own
    • Provide helper methods on command exec context to replicateEssentialsCommand
    • Think about command node impl in more depth
  • Rewrite/essentials, splitting complex subcommands into separate classes
    • Replacerun andtabComplete impls with tree
    • Refactor existing subcommand functions
    • Split out dump into own class (possibly a separate refactor on its own?)

Environments tested:

OS: Windows 11 22H2

Java version: Eclipse Temurin 17.0.6

  • Most recent Paper version (1.19.4, git-Paper-547)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:

This PR should preserve all existing functionality of/essentials.

@YanisBft
Copy link
Contributor

Dumb question maybe, but wouldn't it be possible to use Mojang's brigadier library for this purpose?

@JRoy
Copy link
Member

Dumb question maybe, but wouldn't it be possible to use Mojang's brigadier library for this purpose?

Using that severely limits the flexibility we have and reduces the code quality.

mdcfe reacted with thumbs up emoji

# Conflicts:#Essentials/src/main/java/com/earth2me/essentials/commands/Commandessentials.java
@JRoyJRoy mentioned this pull requestJul 22, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@mdcfe@YanisBft@JRoy

[8]ページ先頭

©2009-2025 Movatter.jp