Class FlagParseException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.plotsquared.core.plot.flag.FlagParseException
All Implemented Interfaces:
Serializable

public class FlagParseException extends Exception
See Also:
Serialized Form
  • 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 instance
      value - Value that failed ot parse
      errorMessage - An error message explaining the failure
      args - Arguments used to format the error message
  • Method Details

    • getValue

      public String getValue()
      Returns the value that caused the parse exception
      Returns:
      Value that failed to parse
    • getFlag

      public PlotFlag<?,​?> getFlag()
      Returns the class that threw the exception
      Returns:
      Flag that threw the exception
    • getErrorMessage

      public Caption getErrorMessage()
      Get the error message that was supplied by the flag instance.
      Returns:
      Error message.
    • getTemplates

      public net.kyori.adventure.text.minimessage.Template[] getTemplates()
      Get the templates that were supplied by the flag instance.
      Returns:
      Message templates.