forked from SteamWar/SteamWar
Merge pull request 'Add BauLockState.SUPERVISOR' (#80) from VelocityCore/BauLockSupervisor into main
Reviewed-on: SteamWar/SteamWar#80 Reviewed-by: D4rkr34lm <dark@steamwar.de>
This commit is contained in:
@@ -38,6 +38,7 @@ SCOREBOARD_TRACE_TICKS=Ticks
|
|||||||
SCOREBOARD_TECHHIDER=TechHider§8: §aOn
|
SCOREBOARD_TECHHIDER=TechHider§8: §aOn
|
||||||
SCOREBOARD_XRAY=XRay§8: §aOn
|
SCOREBOARD_XRAY=XRay§8: §aOn
|
||||||
SCOREBOARD_LOCK_TEAM=Bau Lock§8: §eTeam
|
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_TEAM_AND_SERVERTEAM=Bau Lock§8: §e(Server) Team
|
||||||
SCOREBOARD_LOCK_SERVERTEAM=Bau Lock§8: §eServer Team
|
SCOREBOARD_LOCK_SERVERTEAM=Bau Lock§8: §eServer Team
|
||||||
SCOREBOARD_LOCK_NOBODY=Bau Lock§8: §cNobody
|
SCOREBOARD_LOCK_NOBODY=Bau Lock§8: §cNobody
|
||||||
|
|||||||
+1
@@ -59,6 +59,7 @@ public class BauLockStateScoreboard implements ScoreboardElement {
|
|||||||
public enum BauLockState {
|
public enum BauLockState {
|
||||||
|
|
||||||
NOBODY,
|
NOBODY,
|
||||||
|
SUPERVISOR,
|
||||||
SERVERTEAM,
|
SERVERTEAM,
|
||||||
TEAM_AND_SERVERTEAM,
|
TEAM_AND_SERVERTEAM,
|
||||||
TEAM,
|
TEAM,
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
package de.steamwar.velocitycore.util;
|
package de.steamwar.velocitycore.util;
|
||||||
|
|
||||||
import de.steamwar.messages.Chatter;
|
import de.steamwar.messages.Chatter;
|
||||||
|
import de.steamwar.sql.BauweltMember;
|
||||||
import de.steamwar.sql.SteamwarUser;
|
import de.steamwar.sql.SteamwarUser;
|
||||||
import de.steamwar.sql.UserConfig;
|
import de.steamwar.sql.UserConfig;
|
||||||
import de.steamwar.sql.UserPerm;
|
import de.steamwar.sql.UserPerm;
|
||||||
@@ -44,6 +45,10 @@ public class BauLock {
|
|||||||
case NOBODY:
|
case NOBODY:
|
||||||
locked = true;
|
locked = true;
|
||||||
break;
|
break;
|
||||||
|
case SUPERVISOR:
|
||||||
|
BauweltMember member = BauweltMember.getBauMember(owner.getId(), target.getId());
|
||||||
|
locked = !member.isSupervisor();
|
||||||
|
break;
|
||||||
case SERVERTEAM:
|
case SERVERTEAM:
|
||||||
locked = !target.hasPerm(UserPerm.TEAM);
|
locked = !target.hasPerm(UserPerm.TEAM);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ package de.steamwar.velocitycore.util;
|
|||||||
public enum BauLockState {
|
public enum BauLockState {
|
||||||
|
|
||||||
NOBODY, // Locks the build server for all users
|
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
|
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_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
|
TEAM, //opens the build server only for every added user which is in the same team as the buildOwner
|
||||||
|
|||||||
Reference in New Issue
Block a user