Class NamespacedUtils
java.lang.Object
ch.njol.skript.bukkitutil.NamespacedUtils
Utility class for
NamespacedKey-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ValidationResult<org.bukkit.NamespacedKey> checkValidation(String string) Check if thestringis valid for aNamespacedKeyand get aValidationResultcontaining if it's valid, an error or warning message and the resultingNamespacedKey.static @Nullable org.bukkit.NamespacedKeycheckValidationAndSend(String string, RuntimeErrorProducer producer) A helper method to runcheckValidation(String)and send the appropriate runtime errors/warnings.static booleanCheck ifstringis valid for aNamespacedKey.static booleanisValidKeyChar(char character) static booleanisValidNamespaceChar(char character)
-
Field Details
-
NAMEDSPACED_FORMAT_MESSAGE
-
-
Constructor Details
-
NamespacedUtils
public NamespacedUtils()
-
-
Method Details
-
isValidNamespaceChar
-
isValidKeyChar
-
checkValidation
Check if thestringis valid for aNamespacedKeyand get aValidationResultcontaining if it's valid, an error or warning message and the resultingNamespacedKey.- Parameters:
string- TheStringto check.- Returns:
ValidationResult.
-
checkValidationAndSend
@Nullable public static @Nullable org.bukkit.NamespacedKey checkValidationAndSend(String string, RuntimeErrorProducer producer) A helper method to runcheckValidation(String)and send the appropriate runtime errors/warnings.- Parameters:
string- The string to parse as a namespaced key.producer- The producer from which to send runtime errors.- Returns:
- The key, if parsed without errors, otherwise null.
-
isValid
-