try-catch all sign initializations; resolves #799

This commit is contained in:
Daniel Saukel 2020-06-30 13:49:16 +02:00
parent c172d8e8cc
commit a1b163e563
2 changed files with 14 additions and 2 deletions

View File

@ -89,7 +89,13 @@ public class ScriptSign extends Passive {
continue;
}
try {
dSign.initialize();
} catch (Exception exception) {
dSign.markAsErroneous("An error occurred while initializing a sign of the type " + dSign.getName()
+ ". This is not a user error. Please report the following stacktrace to the developer of the plugin:");
exception.printStackTrace();
}
if (!dSign.hasTriggers()) {
dSign.trigger(null);
}

View File

@ -189,7 +189,13 @@ public class DGameWorld extends DInstanceWorld implements GameWorld {
}
if (dSign.isOnDungeonInit()) {
try {
dSign.initialize();
} catch (Exception exception) {
dSign.markAsErroneous("An error occurred while initializing a sign of the type " + dSign.getName()
+ ". This is not a user error. Please report the following stacktrace to the developer of the plugin:");
exception.printStackTrace();
}
if (!dSign.isErroneous() && dSign.isSetToAir()) {
dSign.setToAir();
}