Player Stages
Link to player-stages
The GameStages API expands CraftTweaker's IPlayer functionality to allow you to check and modify a player's stages.
Calling the methods
Link to calling-the-methods
As this is a ZenExpansion, you can simply call the methods on any IPlayer object, or any of it's subtypes.
Methods
Link to methods
Check for gamestages
Link to check-for-gamestages
The methods return booleans.
ZenScript Copy// Checks if the player has the passed stage.
//player.hasGameStage(String stage);
player.hasGameStage("one");
// Checks if the player has any of the passed stages. They only need one.
//player.hasAnyGameStages(String... stages);
player.hasAnyGameStages("one", "two");
// Checks if the player has all of the passed stages.
//player.hasAllGameStages (String... stages);
player.hasAllGameStages ("one", "two");
Add or remove a gamestage
Link to add-or-remove-a-gamestage
The methods return void (nothing).
ZenScript Copy// Unlocks a stage for a player.
//addGameStage(String stage);
addGameStage(String stage);
// Locks a stage for a player.
//removeGameStage(String stage);
removeGameStage(String stage);