Catch DungeonSign#trigger() exceptions
This commit is contained in:
parent
b5e53cfce7
commit
cfd3e026bb
|
@ -185,7 +185,13 @@ public interface DungeonSign {
|
|||
}
|
||||
}
|
||||
|
||||
trigger(lastFired != null ? lastFired.getPlayer() : null);
|
||||
try {
|
||||
trigger(lastFired != null ? lastFired.getPlayer() : null);
|
||||
} catch (Exception exception) {
|
||||
markAsErroneous("An error occurred while triggering a sign of the type " + getName()
|
||||
+ ". This is not a user error. Please report the following stacktrace to the developer of the plugin:");
|
||||
exception.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -97,7 +97,13 @@ public class ScriptSign extends Passive {
|
|||
exception.printStackTrace();
|
||||
}
|
||||
if (!dSign.hasTriggers()) {
|
||||
dSign.trigger(null);
|
||||
try {
|
||||
dSign.trigger(null);
|
||||
} catch (Exception exception) {
|
||||
markAsErroneous("An error occurred while triggering a sign of the type " + getName()
|
||||
+ ". This is not a user error. Please report the following stacktrace to the developer of the plugin:");
|
||||
exception.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -437,7 +437,13 @@ public class DGameWorld extends DInstanceWorld implements GameWorld {
|
|||
sign.setToAir();
|
||||
}
|
||||
if (!sign.hasTriggers()) {
|
||||
sign.trigger(null);
|
||||
try {
|
||||
sign.trigger(null);
|
||||
} catch (Exception exception) {
|
||||
sign.markAsErroneous("An error occurred while triggering a sign of the type " + getName()
|
||||
+ ". This is not a user error. Please report the following stacktrace to the developer of the plugin:");
|
||||
exception.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue