Class EntryLoader

java.lang.Object
io.github.syst3ms.skriptparser.lang.entries.EntryLoader
Direct Known Subclasses:
OptionLoader, SectionLoader

public abstract class EntryLoader extends Object
  • Field Details

    • key

      protected final String key
  • Constructor Details

    • EntryLoader

      public EntryLoader(String key, boolean optional)
  • Method Details

    • loadEntry

      public abstract boolean loadEntry(SectionConfiguration config, FileElement element, ParserState parserState, SkriptLogger logger)
      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.
      Parameters:
      config - the configuration
      element - the element
      parserState - the parser state
      logger - the logger
      Returns:
      true if loaded successfully, false if an error occurred
    • isOptional

      public boolean isOptional()