From 77cf1018897efbd127c5dfa2a105f3756ec7accb Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Thu, 26 Jun 2025 14:49:48 +0200 Subject: [PATCH 1/2] Add BauLockState.SUPERVISOR --- VelocityCore/src/de/steamwar/velocitycore/util/BauLock.java | 5 +++++ .../src/de/steamwar/velocitycore/util/BauLockState.java | 1 + 2 files changed, 6 insertions(+) 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 From 1c8d6580d59bbc76c52150081294f23fc8a1c265 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Thu, 26 Jun 2025 21:01:29 +0200 Subject: [PATCH 2/2] Fix Scoreboard --- BauSystem/BauSystem_Main/src/BauSystem.properties | 1 + .../bausystem/features/world/BauLockStateScoreboard.java | 1 + 2 files changed, 2 insertions(+) diff --git a/BauSystem/BauSystem_Main/src/BauSystem.properties b/BauSystem/BauSystem_Main/src/BauSystem.properties index 90f1d4cf..5a4a2da2 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,