isBanned() check on canCreate() (#7745)

This commit is contained in:
Даркнесс#3729
2022-10-20 22:31:06 +03:00
committed by GitHub
parent b10a146cd9
commit abdc3ee33c

View File

@@ -93,7 +93,7 @@ public class Units{
/** @return whether a new instance of a unit of this team can be created. */
public static boolean canCreate(Team team, UnitType type){
return team.data().countType(type) < getCap(team);
return team.data().countType(type) < getCap(team) && !type.isBanned();
}
public static int getCap(Team team){