mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-02 17:00:19 +01:00
try-catch all sign initializations; resolves #799
This commit is contained in:
parent
c172d8e8cc
commit
a1b163e563
@ -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);
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user