mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-20 15:39:21 +00:00
bypass other names
This commit is contained in:
@@ -165,6 +165,10 @@ public class MiniMessageTranslationRegistryImpl implements Examinable, MiniMessa
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @Nullable Tag resolve(final @NotNull String name, final @NotNull ArgumentQueue arguments, final @NotNull Context ctx) throws ParsingException {
|
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));
|
final int index = arguments.popOr("No argument number provided").asInt().orElseThrow(() -> ctx.newException("Invalid argument number", arguments));
|
||||||
|
|
||||||
if (index < 0 || index >= argumentComponents.size()) {
|
if (index < 0 || index >= argumentComponents.size()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user