Skip to content

Instantly share code, notes, and snippets.

@Dinnerbone
Created September 29, 2014 11:21
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Dinnerbone/2a185a41dcddfb9abb67 to your computer and use it in GitHub Desktop.
Save Dinnerbone/2a185a41dcddfb9abb67 to your computer and use it in GitHub Desktop.
dispatcher.registerCommand(
literal("scoreboard").then(
literal("players").then(
literal("reset").then(
argument("players", players()).then(
optional("objective", objective())
).executes(SOME_COMMAND)
)
).then(
literal("list").then(
argument("players", players())
).executes(SOME_COMMAND)
)
).then(
literal("objectives").then(
literal("list").executes(SOME_COMMAND)
).then(
literal("setdisplay").then(
argument("slot", enumValues(ScoreboardSlotTypes.class)).then(
argument("objective", objective())
).executes(SOME_COMMAND)
)
)
)
);
@alfuken
Copy link

alfuken commented Dec 2, 2014

Oh the horror… Why don't you just use LUA for user-created stuff, like lots of other mature projects does? Instead of this… this… spaghetti.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment