Skip to content

feat: disallow can_close_with_escape in dialogs - #410

Open
mirkokral wants to merge 2 commits into
kaboomserver:masterfrom
mirkokral:dialog_checking
Open

mirkokral wants to merge 2 commits into
kaboomserver:masterfrom
mirkokral:dialog_checking

Conversation

@mirkokral

Copy link
Copy Markdown

This commit replaces the p in can_close_with_escape in the dialog command with a q, making the dialog never unclosable.
This is acomplishable because dialog takes any snbt that is a dialog, including extra nbt.

return checkSelectors(arr, 1);
}
case "/minecraft:dialog", "/dialog" -> {
if (command.contains("can_close_with_escape")) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is trivial to bypass by simply using unicode character escapes.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

either the unicode character escapes can be resolved or (probably, new dep or much code) better, probably just parse snbt

Comment thread .factorypath Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why was this file added?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

added it by accident, because i use git add . and this was not in gitignore. resolved in 08a130f.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants