Class MaterialParser
- java.lang.Object
- 
- com.github.siroshun09.mccommand.bukkit.parser.MaterialParser
 
- 
- All Implemented Interfaces:
- ArgumentParser<Material>
 
 public class MaterialParser extends Object implements ArgumentParser<Material> 
- 
- 
Constructor SummaryConstructors Constructor Description MaterialParser()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable Materialparse(@NotNull Argument argument)Parses anArgumentto a specified type and returns it.@NotNull MaterialparseOrThrow(@NotNull Argument argument)Parses anArgumentto a specified type and returns it.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface com.github.siroshun09.mccommand.common.argument.parser.ArgumentParsergenerateException, generateException, parseOptional, parseOrDefault
 
- 
 
- 
- 
- 
Constructor Detail- 
MaterialParserpublic MaterialParser() 
 
- 
 - 
Method Detail- 
parse@Nullable public @Nullable Material parse(@NotNull @NotNull Argument argument) Parses anArgumentto a specified type and returns it.- Specified by:
- parsein interface- ArgumentParser<Material>
- Parameters:
- argument- the argument to be parsed
- Returns:
- the value to be parsed, or nullif the parsing fails
 
 - 
parseOrThrow@NotNull public @NotNull Material parseOrThrow(@NotNull @NotNull Argument argument) throws IllegalArgumentException Parses anArgumentto a specified type and returns it.Depending on the implementation, it is possible to use Throwable.getCause()to get the exception that caused the conversion to fail.- Specified by:
- parseOrThrowin interface- ArgumentParser<Material>
- Parameters:
- argument- the argument to be parsed
- Returns:
- the value to be parsed, or nullif the parsing fails
- Throws:
- IllegalArgumentException- if the parsing fails
 
 
- 
 
-