Class LiteralLoader<T>


public class LiteralLoader<T> extends OptionLoader
  • Constructor Details

    • LiteralLoader

      public LiteralLoader(String key, Class<T> typeClass, boolean multiple, boolean optional)
  • Method Details

    • loadEntry

      public boolean loadEntry(SectionConfiguration config, FileElement element, ParserState parserState, SkriptLogger logger)
      Description copied from class: EntryLoader
      This EntryLoader will attempt to load the entry using its FileElement. One can use this method to create specific error messages or to load the value correctly.
      If an error occurred while executing this method, meaning SkriptLogger.hasError() is true, the parser will not loop over the other elements present. If this method returned false, but there is no error given, a default error message "The entry has not been configured." will be used.
      Overrides:
      loadEntry in class OptionLoader
      Parameters:
      config - the configuration
      element - the element
      parserState - the parser state
      logger - the logger
      Returns:
      true if loaded successfully, false if an error occurred