mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2025-01-24 12:44:56 +08:00
Fail if any mask fails to parse (#1465)
This commit is contained in:
parent
b0d5100e4e
commit
f2e5c52f36
@ -98,13 +98,18 @@ public Mask parseFromInput(String input, ParserContext context) throws InputPars
|
||||
continue;
|
||||
}
|
||||
|
||||
Mask match = null;
|
||||
for (InputParser<Mask> parser : getParsers()) {
|
||||
Mask match = parser.parseFromInput(component, context);
|
||||
match = parser.parseFromInput(component, context);
|
||||
|
||||
if (match != null) {
|
||||
masks.add(match);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (match == null) {
|
||||
throw new NoMatchException(TranslatableComponent.of("worldedit.error.no-match", TextComponent.of(component)));
|
||||
}
|
||||
masks.add(match);
|
||||
}
|
||||
|
||||
switch (masks.size()) {
|
||||
|
Loading…
Reference in New Issue
Block a user