Skip to content

Commit ff56acf

Browse files
committed
Don't restore backup unless there are errors from the statement parse
1 parent 7bcd5cb commit ff56acf

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

src/main/java/ch/njol/skript/ScriptLoader.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,11 +1005,6 @@ public static ArrayList<TriggerItem> loadItems(SectionNode node) {
10051005
// restore the failure log
10061006
if (errors.isEmpty()) {
10071007
handler.restore(backup);
1008-
} else { // We specifically want these two errors in preference to the section error!
1009-
String firstError = errors.iterator().next().getMessage();
1010-
if (!firstError.contains("is a valid statement but cannot function as a section (:)")
1011-
&& !firstError.contains("You cannot have two section-starters in the same line"))
1012-
handler.restore(backup);
10131008
}
10141009
continue;
10151010
} finally {

0 commit comments

Comments
 (0)