From 36ea51b593f1789907a6fcbca39b968b29250477 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 15 Jun 2017 13:31:35 +0200 Subject: [PATCH] Fixed NPE when hologram interaction is disabled --- src/main/java/de/epiceric/shopchest/nms/Hologram.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/epiceric/shopchest/nms/Hologram.java b/src/main/java/de/epiceric/shopchest/nms/Hologram.java index d288422..5458bb9 100644 --- a/src/main/java/de/epiceric/shopchest/nms/Hologram.java +++ b/src/main/java/de/epiceric/shopchest/nms/Hologram.java @@ -155,7 +155,9 @@ public class Hologram { wrapper.setVisible(p, true); } - interactArmorStandWrapper.setVisible(p, true); + if (interactArmorStandWrapper != null) { + interactArmorStandWrapper.setVisible(p, true); + } } }.runTaskAsynchronously(plugin); @@ -173,7 +175,9 @@ public class Hologram { wrapper.setVisible(p, false); } - interactArmorStandWrapper.setVisible(p, false); + if (interactArmorStandWrapper != null) { + interactArmorStandWrapper.setVisible(p, false); + } } }.runTaskAsynchronously(plugin);