From c7937847bc67a852c89bbf9c5361be11393afb61 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 22 Sep 2022 21:30:32 +0200 Subject: [PATCH] Update TeamCommand --- .../bungeecore/commands/TeamCommand.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/TeamCommand.java b/src/de/steamwar/bungeecore/commands/TeamCommand.java index 843aed0..5af8f4b 100644 --- a/src/de/steamwar/bungeecore/commands/TeamCommand.java +++ b/src/de/steamwar/bungeecore/commands/TeamCommand.java @@ -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 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 inTeamValidator() { return (sender, value, messageSender) -> { if (SteamwarUser.get(value).getTeam() != 0) { @@ -181,8 +181,8 @@ public class TeamCommand extends SWCommand { }; } - @Validator("notLeader") - private TypeValidator notLeaderValidator() { + @Validator(value = "isLeader", local = true) + private TypeValidator isLeaderValidator() { TypeValidator 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 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 teamJoinValidator() { TypeValidator noTeam = noTeamValidator(); TypeValidator notDuringEvent = notDuringEventValidator(); @@ -222,7 +222,7 @@ public class TeamCommand extends SWCommand { }; } - @Mapper("teamJoinTypeMapper") + @Mapper(value = "teamJoinTypeMapper", local = true) private TypeMapper teamJoinTypeMapper() { return new TypeMapper() { @Override @@ -263,7 +263,7 @@ public class TeamCommand extends SWCommand { }; } - @Validator("unusedKuerzel") + @Validator(value = "unusedKuerzel", local = true) private TypeValidator 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 unusedTeamName() { return (sender, value, messageSender) -> { if (value.length() < 4 || value.length() > 15) {