9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-19 15:09:25 +00:00

bypass other names

This commit is contained in:
XiaoMoMi
2024-10-30 19:59:23 +08:00
parent 5d4d545bf9
commit cb699e4595

View File

@@ -165,6 +165,10 @@ public class MiniMessageTranslationRegistryImpl implements Examinable, MiniMessa
@Override
public @Nullable Tag resolve(final @NotNull String name, final @NotNull ArgumentQueue arguments, final @NotNull Context ctx) throws ParsingException {
if (!has(name)) {
return null;
}
final int index = arguments.popOr("No argument number provided").asInt().orElseThrow(() -> ctx.newException("Invalid argument number", arguments));
if (index < 0 || index >= argumentComponents.size()) {