switch/case Indentation
Why case labels must sit at the same level as switch, not deeper.
execute java reuses Skript’s own config-node parser to read the block, and that parser treats
any line ending in : as opening a nested section — including Java’s case 1: / default:.
That means case labels must sit at the same indentation as the switch statement itself,
one level shallower than normal Java style, with only the body indented further:
switch (x) {
case 1:
result = "one";
break;
default:
result = "other";
}
Indenting case/default one level deeper — the way an IDE would format it — makes Skript’s
parser report an indentation error, and the plugin rejects the block with
maintain the script's indentation.