diff --git a/BauSystem/BauSystem_Main/src/BauSystem.properties b/BauSystem/BauSystem_Main/src/BauSystem.properties index 1794779a..2a829ec1 100644 --- a/BauSystem/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem/BauSystem_Main/src/BauSystem.properties @@ -38,6 +38,7 @@ SCOREBOARD_TRACE_TICKS=Ticks SCOREBOARD_TECHHIDER=TechHider§8: §aOn SCOREBOARD_XRAY=XRay§8: §aOn SCOREBOARD_LOCK_TEAM=Bau Lock§8: §eTeam +SCOREBOARD_LOCK_SUPERVISOR=Bau Lock§8: §eSupervisor SCOREBOARD_LOCK_TEAM_AND_SERVERTEAM=Bau Lock§8: §e(Server) Team SCOREBOARD_LOCK_SERVERTEAM=Bau Lock§8: §eServer Team SCOREBOARD_LOCK_NOBODY=Bau Lock§8: §cNobody diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauLockStateScoreboard.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauLockStateScoreboard.java index ab3630d4..3e159311 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauLockStateScoreboard.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauLockStateScoreboard.java @@ -59,6 +59,7 @@ public class BauLockStateScoreboard implements ScoreboardElement { public enum BauLockState { NOBODY, + SUPERVISOR, SERVERTEAM, TEAM_AND_SERVERTEAM, TEAM, 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