From 1ddc58d1fbd0b583fa4d779c74be0b8acbdb23a6 Mon Sep 17 00:00:00 2001 From: jojo Date: Mon, 25 Jan 2021 17:22:22 +0100 Subject: [PATCH] Hotfix ScriptListener Script Book check --- .../src/de/steamwar/bausystem/world/ScriptListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/ScriptListener.java b/BauSystem_Main/src/de/steamwar/bausystem/world/ScriptListener.java index d0f2fc8..3fb474c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/ScriptListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/ScriptListener.java @@ -55,7 +55,7 @@ public class ScriptListener implements Listener { if(item == null || isNoBook(item) || item.getItemMeta() == null) return; - if (CommandScript.BOOK.getItemMeta() != null && item.getItemMeta().getDisplayName().equals(CommandScript.BOOK.getItemMeta().getDisplayName())) { + if (CommandScript.BOOK.getItemMeta() != null && item.getItemMeta().hasDisplayName() && item.getItemMeta().getDisplayName().equals(CommandScript.BOOK.getItemMeta().getDisplayName())) { return; }