From 3f813bd971fb22fcdc2bd77b6834b932cb661b3e Mon Sep 17 00:00:00 2001 From: Lixfel Date: Mon, 7 Sep 2020 21:08:45 +0200 Subject: [PATCH] Fixing an npe Signed-off-by: Lixfel --- .../src/de/steamwar/schematicsystem/commands/GUI.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SchematicSystem_Main/src/de/steamwar/schematicsystem/commands/GUI.java b/SchematicSystem_Main/src/de/steamwar/schematicsystem/commands/GUI.java index 591aff4..81a6076 100644 --- a/SchematicSystem_Main/src/de/steamwar/schematicsystem/commands/GUI.java +++ b/SchematicSystem_Main/src/de/steamwar/schematicsystem/commands/GUI.java @@ -80,7 +80,8 @@ class GUI { SWInventory inv = new SWInventory(p, 9, schem.getSchemName() + " entfernen"); inv.setItem(0, SWItem.getDye(1), (byte) 1, "§eZugriff entfernen", click -> { SchematicMember member = SchematicMember.getSchemMemberFromDB(schem.getSchemName(), schem.getSchemOwner(), SteamwarUser.get(p.getUniqueId()).getId()); - member.remove(); + if(member != null) + member.remove(); p.sendMessage(SchematicSystem.PREFIX + "Zugriff zu Schematic §e" + schem.getSchemName() + " §7entfernt"); p.closeInventory(); });