Skip to content

Commit

Permalink
SectionLoader: small change
Browse files Browse the repository at this point in the history
  • Loading branch information
Mwexim committed Oct 31, 2023
1 parent db74e82 commit db9a859
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ public SectionLoader(String key, boolean optional) {

@Override
public boolean loadEntry(SectionConfiguration config, FileElement element, ParserState parserState, SkriptLogger logger) {
if (!element.getLineContent().equalsIgnoreCase(this.key))
if (!element.getLineContent().equalsIgnoreCase(key))
return false;
if (!(element instanceof FileSection)) {
logger.error("The entry '" + key + "' has been configured incorrectly.", ErrorType.SEMANTIC_ERROR);
return false;
}
var entry = new SimpleCodeSection((FileSection) element, parserState, logger, element.getLineContent());
var entry = new SimpleCodeSection((FileSection) element, parserState, logger, key);
if (config.getParent() != null)
entry.setParent(config.getParent());
config.getData().put(key, entry);
Expand Down

0 comments on commit db9a859

Please sign in to comment.