public class TagParser
extends java.lang.Object
implements org.bukkit.Keyed
TagParser is responsible for parsing a JSON input into a TagWrapperMock.| Constructor and Description |
|---|
TagParser(@NotNull TagRegistry registry,
@NotNull org.bukkit.NamespacedKey key)
This constructs a new
TagParser. |
| Modifier and Type | Method and Description |
|---|---|
@NotNull org.bukkit.NamespacedKey |
getKey() |
void |
parse(@NotNull java.lang.String json,
@NotNull java.util.function.BiConsumer<java.util.Set<org.bukkit.Material>,java.util.Set<TagWrapperMock>> callback)
This will parse the given JSON
String and run the provided callback with Sets of matched
Materials and Tags. |
public TagParser(@NotNull
@NotNull TagRegistry registry,
@NotNull
@NotNull org.bukkit.NamespacedKey key)
TagParser.registry - The TagRegistry for the resulting Tagkey - The NamespacedKey of the resulting Tagpublic void parse(@NotNull
@NotNull java.lang.String json,
@NotNull
@NotNull java.util.function.BiConsumer<java.util.Set<org.bukkit.Material>,java.util.Set<TagWrapperMock>> callback)
throws TagMisconfigurationException
String and run the provided callback with Sets of matched
Materials and Tags.json - The JSON String to parsecallback - A callback to run after successfully parsing the inputTagMisconfigurationException - This is thrown whenever the given input is malformed or no adequate
Material or Tag could be found@NotNull public @NotNull org.bukkit.NamespacedKey getKey()
getKey in interface org.bukkit.Keyed