From 6232da87b5096c314fd4971f97711c586368cb51 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Fri, 28 Jun 2024 15:44:35 +0200 Subject: [PATCH] Fix Bau delmember when player online but Bau not running Signed-off-by: Lixfel --- src/de/steamwar/velocitycore/commands/BauCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/velocitycore/commands/BauCommand.java b/src/de/steamwar/velocitycore/commands/BauCommand.java index 5e37b99..d53b2e9 100644 --- a/src/de/steamwar/velocitycore/commands/BauCommand.java +++ b/src/de/steamwar/velocitycore/commands/BauCommand.java @@ -162,7 +162,8 @@ public class BauCommand extends SWCommand { Chatter member = Chatter.of(user.getUUID()); member.system("BAU_DELMEMBER_DELETED_TARGET", owner); member.withPlayer(player -> { - if (Bauserver.get(owner.user().getUUID()).getRegisteredServer().getPlayersConnected().contains(player)) + Bauserver bauserver = Bauserver.get(owner.user().getUUID()); + if (bauserver != null && bauserver.getRegisteredServer().getPlayersConnected().contains(player)) player.createConnectionRequest(VelocityCore.get().getConfig().lobbyserver()).fireAndForget(); });