Package com.plotsquared.core.plot.flag
Class FlagParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.plotsquared.core.plot.flag.FlagParseException
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFlagParseException
(PlotFlag<?, ?> flag, String value, Caption errorMessage, net.kyori.adventure.text.minimessage.Template... args) Construct a new flag parse exception to indicate that an attempt to parse a plot flag was unsuccessful. -
Method Summary
Modifier and TypeMethodDescriptionGet the error message that was supplied by the flag instance.PlotFlag<?,
?> getFlag()
Returns the class that threw the exceptionnet.kyori.adventure.text.minimessage.Template[]
Get the templates that were supplied by the flag instance.getValue()
Returns the value that caused the parse exceptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
FlagParseException
public FlagParseException(PlotFlag<?, ?> flag, String value, Caption errorMessage, net.kyori.adventure.text.minimessage.Template... args) Construct a new flag parse exception to indicate that an attempt to parse a plot flag was unsuccessful.- Parameters:
flag
- Flag instancevalue
- Value that failed ot parseerrorMessage
- An error message explaining the failureargs
- Arguments used to format the error message
-
-
Method Details
-
getValue
Returns the value that caused the parse exception- Returns:
- Value that failed to parse
-
getFlag
Returns the class that threw the exception- Returns:
- Flag that threw the exception
-
getErrorMessage
Get the error message that was supplied by the flag instance.- Returns:
- Error message.
-
getTemplates
Get the templates that were supplied by the flag instance.- Returns:
- Message templates.
-