๐Ÿ› Override build in Material and Enchant arguments

This commit is contained in:
jmp 2020-10-11 21:19:32 -07:00
parent 0af788fa1d
commit 378d57964f
2 changed files with 20 additions and 0 deletions

View file

@ -108,6 +108,16 @@ public class EnchantmentArgument<C> extends CommandArgument<C, Enchantment> {
super(Enchantment.class, name); super(Enchantment.class, name);
} }
@Override
public @NonNull CommandArgument<C, Enchantment> build() {
return new EnchantmentArgument<>(
this.isRequired(),
this.getName(),
this.getDefaultValue(),
this.getSuggestionsProvider()
);
}
} }
public static final class EnchantmentParser<C> implements ArgumentParser<C, Enchantment> { public static final class EnchantmentParser<C> implements ArgumentParser<C, Enchantment> {

View file

@ -107,6 +107,16 @@ public class MaterialArgument<C> extends CommandArgument<C, Material> {
super(Material.class, name); super(Material.class, name);
} }
@Override
public @NonNull CommandArgument<C, Material> build() {
return new MaterialArgument<>(
this.isRequired(),
this.getName(),
this.getDefaultValue(),
this.getSuggestionsProvider()
);
}
} }
public static final class MaterialParser<C> implements ArgumentParser<C, Material> { public static final class MaterialParser<C> implements ArgumentParser<C, Material> {