Class NamespaceJsonParser
java.lang.Object
org.woftnw.eof.io.parse.common.string.StringJsonParser<org.bukkit.NamespacedKey>
org.woftnw.eof.io.parse.common.string.NamespaceJsonParser
- All Implemented Interfaces:
JsonParser<org.bukkit.NamespacedKey>
Parses a JSON string to a
NamespacedKey.-
Field Summary
Fields inherited from class StringJsonParser
DEFAULT_MAX_LENGTH, DEFAULT_MIN_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.NamespacedKeyparse(@NonNull com.google.gson.JsonElement element, ElytrasOfFire plugin) Parse a givenJsonElement.
-
Constructor Details
-
NamespaceJsonParser
public NamespaceJsonParser()Create a NamespaceJsonParser.
-
-
Method Details
-
parse
public org.bukkit.NamespacedKey parse(@NonNull com.google.gson.JsonElement element, ElytrasOfFire plugin) throws EoFJsonParseException Description copied from interface:JsonParserParse a givenJsonElement.- Parameters:
element- The element to parse and validate.plugin- The Elytras of Fire plugin instance.- Returns:
- The parsed and validated object.
- Throws:
EoFJsonParseException- If something goes wrong while parsing or validating.
-