Fix script sign NPE

This commit is contained in:
Daniel Saukel 2020-04-15 17:56:40 +02:00
parent cf362e664b
commit e62b081ca3

View File

@ -77,6 +77,11 @@ public class ScriptSign extends Passive {
@Override
public void initialize() {
SignScript script = ((DungeonsXL) api).getSignScriptRegistry().get(scriptName);
if (script == null) {
markAsErroneous("The script \"" + scriptName + "\" could not be found.");
return;
}
for (String[] lines : script.getSigns()) {
DungeonSign dSign = getGameWorld().createDungeonSign(getSign(), lines);
if (dSign.isErroneous()) {