๐ Override build in Material and Enchant arguments
This commit is contained in:
parent
0af788fa1d
commit
378d57964f
2 changed files with 20 additions and 0 deletions
|
|
@ -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> {
|
||||||
|
|
|
||||||
|
|
@ -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> {
|
||||||
|
|
|
||||||
Loadingโฆ
Add table
Add a link
Reference in a new issue