Skip to content

My custom command in my mod doesn't work. #1329

Discussion options

You must be logged in to vote

You are closing the builder for the message argument too early for the executes to apply to it. Instead, the sing method will run for /sing only.

Instead, use this:

dispatcher.register(literal("sing")
	.then(argument("message", greedyString())
	.executes { context -> sing(context.source, getString(context,"message")) }))

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@yliu7949
Comment options

Answer selected by yliu7949
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants