Package dev.scsupercraft.teamstages.data
Class TeamStageHelper
java.lang.Object
dev.scsupercraft.teamstages.data.TeamStageHelper
A helper class for managing stages.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA helper class for managing player stages.static classA helper class for managing team stages. -
Method Summary
Modifier and TypeMethodDescriptionGets an immutable set of all the stages defined in the known stages json file.static booleanisStageKnown(String stage) Checks if a stage has been defined in the known stages file.static booleanisValidStageName(String stageName) Checks if a string is valid as a stage name.static TeamStageHelper.PlayerHelperplayer()Returns the player stage helper.static voidsyncPlayer(net.minecraft.server.level.ServerPlayer player) Syncs a player's stage data from the server to the client.static voidsyncTeam(dev.ftb.mods.ftbteams.api.Team team) Goes through the team's online members and syncs their stage data from the server to the client.static TeamStageHelper.TeamHelperteam()Returns the team stage helper.
-
Method Details
-
isValidStageName
Checks if a string is valid as a stage name.- Parameters:
stageName- The potential name.- Returns:
- Whether the name is valid as a stage name.
-
getKnownStages
Gets an immutable set of all the stages defined in the known stages json file.- Returns:
- An immutable set of all known stages.
-
isStageKnown
Checks if a stage has been defined in the known stages file.- Parameters:
stage- The stage name to search for.- Returns:
- Whether the stage name exists in the known stages.
-
player
Returns the player stage helper.- Returns:
- the player stage helper
-
team
Returns the team stage helper.- Returns:
- the team stage helper
-
syncTeam
public static void syncTeam(dev.ftb.mods.ftbteams.api.Team team) Goes through the team's online members and syncs their stage data from the server to the client.- Parameters:
team- The team to sync.- See Also:
-
syncPlayer
public static void syncPlayer(net.minecraft.server.level.ServerPlayer player) Syncs a player's stage data from the server to the client.- Parameters:
player- The player to sync.- See Also:
-