From bb598ba8ad974aa5888840ac180c5f8ac06874de Mon Sep 17 00:00:00 2001 From: jojo Date: Thu, 25 Feb 2021 13:23:44 +0100 Subject: [PATCH] Hotfix CommandReset NPE Hotfix CommandTestblock NPE --- .../src/de/steamwar/bausystem/commands/CommandReset.java | 2 +- .../src/de/steamwar/bausystem/commands/CommandTestblock.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandReset.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandReset.java index 934a383..e53927d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandReset.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandReset.java @@ -46,7 +46,7 @@ public class CommandReset implements CommandExecutor { } Region region = Region.getRegion(player.getLocation()); - if (region == null) { + if (region == Region.GlobalRegion.getInstance()) { player.sendMessage(BauSystem.PREFIX + "§cDu befindest dich derzeit in keiner Region"); return false; } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTestblock.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTestblock.java index 87ffbf3..c8982b2 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTestblock.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTestblock.java @@ -46,7 +46,7 @@ public class CommandTestblock implements CommandExecutor { } Region region = Region.getRegion(player.getLocation()); - if (region == null || !region.hasTestblock()) { + if (!region.hasTestblock()) { player.sendMessage(BauSystem.PREFIX + "§cDu befindest dich derzeit in keiner Region"); return false; }