From 4268647057c212498e25df63f1d67c8b21ea9f82 Mon Sep 17 00:00:00 2001 From: jojo Date: Mon, 25 Jan 2021 16:41:42 +0100 Subject: [PATCH] Fix CommandInfo --- .../src/de/steamwar/bausystem/commands/CommandInfo.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandInfo.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandInfo.java index ae8960f..3c31049 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandInfo.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandInfo.java @@ -41,11 +41,12 @@ public class CommandInfo implements CommandExecutor { Player player = (Player) sender; sender.sendMessage(BauSystem.PREFIX + "Besitzer: §e" + SteamwarUser.get(BauSystem.getOwnerID()).getUserName()); - Region.getRegion(player.getLocation(), region -> { - sender.sendMessage(BauSystem.PREFIX + "§eTNT§8: " + region.getTntMode().getName() + " §eFire§8: " + (region.isFire() ? "§aAUS" : "§cAN") + " §eFreeze§8: " + (region.isFreeze() ? "§aAN" : "§cAUS")); - }, () -> { + Region region = Region.getRegion(player); + if (region == null) { sender.sendMessage(BauSystem.PREFIX + "§7Du bist in keiner Region."); - }); + } else { + sender.sendMessage(BauSystem.PREFIX + "§eTNT§8: " + region.getTntMode().getName() + " §eFire§8: " + (region.isFire() ? "§aAUS" : "§cAN") + " §eFreeze§8: " + (region.isFreeze() ? "§aAN" : "§cAUS")); + } List members = BauweltMember.getMembers(BauSystem.getOwnerID()); StringBuilder membermessage = new StringBuilder().append(BauSystem.PREFIX).append("Mitglieder: ");