diff --git a/VelocityCore/src/de/steamwar/velocitycore/util/BauLock.java b/VelocityCore/src/de/steamwar/velocitycore/util/BauLock.java index 03bc4315..7f95599b 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/util/BauLock.java +++ b/VelocityCore/src/de/steamwar/velocitycore/util/BauLock.java @@ -20,6 +20,7 @@ package de.steamwar.velocitycore.util; import de.steamwar.messages.Chatter; +import de.steamwar.sql.BauweltMember; import de.steamwar.sql.SteamwarUser; import de.steamwar.sql.UserConfig; import de.steamwar.sql.UserPerm; @@ -44,6 +45,10 @@ public class BauLock { case NOBODY: locked = true; break; + case SUPERVISOR: + BauweltMember member = BauweltMember.getBauMember(owner.getId(), target.getId()); + locked = !member.isSupervisor(); + break; case SERVERTEAM: locked = !target.hasPerm(UserPerm.TEAM); break; diff --git a/VelocityCore/src/de/steamwar/velocitycore/util/BauLockState.java b/VelocityCore/src/de/steamwar/velocitycore/util/BauLockState.java index 8fe89bf9..c6b8af4f 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/util/BauLockState.java +++ b/VelocityCore/src/de/steamwar/velocitycore/util/BauLockState.java @@ -22,6 +22,7 @@ package de.steamwar.velocitycore.util; public enum BauLockState { NOBODY, // Locks the build server for all users + SUPERVISOR, // Locks the build server for supervisors SERVERTEAM, // opens the build server only for every added user which is a server team member TEAM_AND_SERVERTEAM, //opens the build server only for every added user which is in the same team as the buildOwner and every server team member TEAM, //opens the build server only for every added user which is in the same team as the buildOwner