From e62b081ca34994a6ee9098c10ffafb96daa6dc81 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Wed, 15 Apr 2020 17:56:40 +0200 Subject: [PATCH] Fix script sign NPE --- .../java/de/erethon/dungeonsxl/sign/passive/ScriptSign.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/main/java/de/erethon/dungeonsxl/sign/passive/ScriptSign.java b/core/src/main/java/de/erethon/dungeonsxl/sign/passive/ScriptSign.java index 105d6a5c..137b2468 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/sign/passive/ScriptSign.java +++ b/core/src/main/java/de/erethon/dungeonsxl/sign/passive/ScriptSign.java @@ -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()) {