SteamWar/BungeeCore
Archiviert
13
2

Update TeamCommand
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed

Dieser Commit ist enthalten in:
yoyosource 2022-09-22 21:30:32 +02:00
Ursprung 18a16e91b0
Commit c7937847bc

Datei anzeigen

@ -128,7 +128,7 @@ public class TeamCommand extends SWCommand {
}
@Register("stepback")
public void stepBack(@Validator("notLeader") ProxiedPlayer player) {
public void stepBack(@Validator("isLeader") ProxiedPlayer player) {
SteamwarUser user = SteamwarUser.get(player);
Team team = Team.get(user.getTeam());
@ -157,7 +157,7 @@ public class TeamCommand extends SWCommand {
Message.send("TEAM_LEAVE_LEFT", player);
}
@Validator("noTeam")
@Validator(value = "noTeam", local = true)
private TypeValidator<ProxiedPlayer> noTeamValidator() {
return (sender, value, messageSender) -> {
if (SteamwarUser.get(value).getTeam() == 0) {
@ -169,7 +169,7 @@ public class TeamCommand extends SWCommand {
};
}
@Validator("inTeam")
@Validator(value = "inTeam", local = true)
private TypeValidator<ProxiedPlayer> inTeamValidator() {
return (sender, value, messageSender) -> {
if (SteamwarUser.get(value).getTeam() != 0) {
@ -181,8 +181,8 @@ public class TeamCommand extends SWCommand {
};
}
@Validator("notLeader")
private TypeValidator<ProxiedPlayer> notLeaderValidator() {
@Validator(value = "isLeader", local = true)
private TypeValidator<ProxiedPlayer> isLeaderValidator() {
TypeValidator<ProxiedPlayer> inTeam = inTeamValidator();
return (sender, value, messageSender) -> {
if (!inTeam.validate(sender, value, messageSender)) return false;
@ -195,7 +195,7 @@ public class TeamCommand extends SWCommand {
};
}
@Validator("notDuringEvent")
@Validator(value = "notDuringEvent", local = true)
private TypeValidator<ProxiedPlayer> notDuringEventValidator() {
return (sender, value, messageSender) -> {
if (Event.get() == null) {
@ -207,7 +207,7 @@ public class TeamCommand extends SWCommand {
};
}
@Validator("teamJoin")
@Validator(value = "teamJoin", local = true)
private TypeValidator<ProxiedPlayer> teamJoinValidator() {
TypeValidator<ProxiedPlayer> noTeam = noTeamValidator();
TypeValidator<ProxiedPlayer> notDuringEvent = notDuringEventValidator();
@ -222,7 +222,7 @@ public class TeamCommand extends SWCommand {
};
}
@Mapper("teamJoinTypeMapper")
@Mapper(value = "teamJoinTypeMapper", local = true)
private TypeMapper<Team> teamJoinTypeMapper() {
return new TypeMapper<Team>() {
@Override
@ -263,7 +263,7 @@ public class TeamCommand extends SWCommand {
};
}
@Validator("unusedKuerzel")
@Validator(value = "unusedKuerzel", local = true)
private TypeValidator<String> unusedTeamKuerzel() {
return (sender, value, messageSender) -> {
if (value.length() < 2 || value.length() > 4) {
@ -280,7 +280,7 @@ public class TeamCommand extends SWCommand {
};
}
@Validator("unusedName")
@Validator(value = "unusedName", local = true)
private TypeValidator<String> unusedTeamName() {
return (sender, value, messageSender) -> {
if (value.length() < 4 || value.length() > 15) {