File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
common/src/main/java/dev/ftb/mods/ftbteams/api Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1111import java .util .Set ;
1212
1313/**
14- * Utility class providing some convenience methods for querying and adjust the team stages for a team. These methods
15- * all handle client sync and team data serialization internally.
14+ * Utility class providing some convenience methods for querying and modifying the team stages for a team. These methods
15+ * all handle client sync and team data serialization for you.
16+ * <p>
17+ * These methods are all safe to call on the client, but it's only useful to query stages on the client with
18+ * {@link #hasTeamStage(Team, String)}; the methods which modify stages do nothing on the client.
1619 * <p>
1720 * Modifying a team's stages also causes a {@link TeamPropertiesChangedEvent} event to be fired.
1821 */
@@ -85,6 +88,9 @@ public static Collection<String> getStages(Team team) {
8588 }
8689
8790 private static int updateStages (Team team , Collection <String > stages , boolean adding ) {
91+ if (team .isClientTeam ()) {
92+ return 0 ;
93+ }
8894 Set <String > stageSet = team .getProperty (TeamProperties .TEAM_STAGES );
8995 int changed = (int ) stages .stream ().filter (stage -> adding && stageSet .add (stage ) || !adding && stageSet .remove (stage )).count ();
9096 if (changed > 0 ) {
You can’t perform that action at this time.
0 commit comments