mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 11:37:05 +01:00
Only set script sign to air if the last sign isSetToAir()
This commit is contained in:
parent
f7ee1f591c
commit
a9c52d201d
@ -82,8 +82,9 @@ public class ScriptSign extends Passive {
|
||||
return;
|
||||
}
|
||||
|
||||
DungeonSign dSign = null;
|
||||
for (String[] lines : script.getSigns()) {
|
||||
DungeonSign dSign = getGameWorld().createDungeonSign(getSign(), lines);
|
||||
dSign = getGameWorld().createDungeonSign(getSign(), lines);
|
||||
if (dSign.isErroneous()) {
|
||||
getGameWorld().removeDungeonSign(dSign);
|
||||
continue;
|
||||
@ -91,9 +92,6 @@ public class ScriptSign extends Passive {
|
||||
|
||||
try {
|
||||
dSign.initialize();
|
||||
if (dSign.isSetToAir()) {
|
||||
dSign.setToAir();
|
||||
}
|
||||
} 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:");
|
||||
@ -109,6 +107,14 @@ public class ScriptSign extends Passive {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dSign == null) {
|
||||
markAsErroneous("The script \"" + scriptName + "\" could not be found.");
|
||||
return;
|
||||
}
|
||||
if (dSign.isSetToAir()) {
|
||||
dSign.setToAir();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user