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

✨ Validate leading slash in command attribute #1491

Merged
merged 7 commits into from
Jul 8, 2024

Conversation

misode
Copy link
Member

@misode misode commented Jul 8, 2024

No description provided.

@misode misode marked this pull request as ready for review July 8, 2024 03:36
})(src, ctx)
}
return mcf.command(rootTreeNode, parser.argument, {
slash: slash === 'chat' ? 'allowed' : slash,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's chat as in a /tellraw component, a slash is actually required (without the slash, it used to just send a chat message in your name, but I think since the chat signing thing, it's just disallowed).

On signs however, a slash is optional.

If the aim is not to 100% solve these cases, the linked issue as wrong, as it describes a v3 bug where DPH+ would show an error when omitting the slash on a sign.

Copy link
Member Author

@misode misode Jul 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm so on signs in the run_command action, it will run the command when you don't start with a slash?

If that's the case I don't immediately see an easy way to fix this, so I'd rather just move the issue to backlog.

@misode misode merged commit 026e817 into SpyglassMC:main Jul 8, 2024
3 checks passed
@misode misode deleted the attribute-tweaks branch July 8, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants