From 9a5b938fba2aa15b1c99425fc975580d2a56083d Mon Sep 17 00:00:00 2001 From: MoBrot <90271578+MoBrot@users.noreply.github.com> Date: Thu, 8 Sep 2022 21:28:21 +0200 Subject: [PATCH] +Fixed Owner message when locked --- src/de/steamwar/bungeecore/commands/BauCommand.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/BauCommand.java b/src/de/steamwar/bungeecore/commands/BauCommand.java index 84d524d5..6a4e4a63 100644 --- a/src/de/steamwar/bungeecore/commands/BauCommand.java +++ b/src/de/steamwar/bungeecore/commands/BauCommand.java @@ -147,9 +147,7 @@ public class BauCommand extends BasicCommand { } if ((!p.getUniqueId().equals(worldOwner.getUuid()) && BauweltMember.getBauMember(worldOwner.getUuid(), p.getUniqueId()) == null)){ - SubserverSystem.sendDeniedMessage(p, worldOwner.getUuid()); - Message.send("BAU_TP_NOALLOWED", p); - return; + } versionSelector(p, args, 2, @@ -336,8 +334,10 @@ public class BauCommand extends BasicCommand { if(activeLockState == null) activeLockState = BauLockState.OPEN; - if(activeLockState == BauLockState.TEAM) + if((!target.getUuid().equals(owner.getUuid()) && BauweltMember.getBauMember(owner.getId(), target.getId()) == null) && !(activeLockState == BauLockState.NOBODY)) { SubserverSystem.sendDeniedMessage(target.getPlayer(), owner.getUuid()); + Message.send("BAU_TP_NOALLOWED", target.getPlayer()); + } return activeLockState == BauLockState.NOBODY || (activeLockState == BauLockState.TEAM && owner.getTeam() == target.getTeam()); }