Skip to content

Stage Utils

Kessy edited this page May 31, 2026 · 1 revision

Stage Utils

The mod includes different essential methods for managing player stages. One method that allows adding a stage to a player, granting them access to specific features or content tied to that stage. Another method enables the removal of a stage, restricting access to any associated features or mechanics. Lastly, other methods check whether a player currently possesses a specific stage, providing a way to implement conditional gameplay logic based on progression.


Methods for Player Stages (Server Side)

Method Description Parameters Returns
AStages.addStageToPlayer(stage, player) Add stage to the player. stage: stage to add.
player: player to add it to.
Void
AStages.removeStageFromPlayer(stage, player) Remove stage from the player. stage: stage to remove.
player: player to remove it from.
Void
AStages.removeAllStagesFromPlayer(player) Remove all stages from the player. player: player to remove it from. Void
AStages.playerHasStage(stage, player) Check if player has a particular stage. stage: stage to check.
player: player to check.
Boolean
AStages.playerHasAtLeastOneStage(stages, player) Check if player has a at least one of the stage in the list. stages: stages (as list) to check.
player: player to check.
Boolean
AStages.playerHasAllStages(stages, player) Check if player has all stages in the list. stages: stages (as list) to check.
player: player to check.
Boolean
AStages.getStagesFromPlayer(player) Get all stages that player unlocked. player: player. List

Methods for Player Stages (Client Side)

Method Description Parameters Returns
AStagesClient.getClientStages() Get all stages that player unlocked. In fact that are the stages that persist in client side: they are copy-pasted from server using synchronisation. - List

Methods for Server Stages (Server Side)

Caution

All informations below can be referred only to versions above 1.3.0.

Method Description Parameters Returns
AStages.addStageToServer(stage, server) Add stage to the server. stage: stage to add.
server: server to add it to.
Void
AStages.removeStageFromServer(stage, server) Remove stage from the server. stage: server to remove.
server: server to remove it from.
Void
AStages.removeAllStagesFromServer(server) Remove all stages from the server. server: server to remove it from. Void
AStages.serverHasStage(stage, server) Check if server has a particular stage. stage: stage to check.
server: server to check.
Boolean
AStages.serverHasAtLeastOneStage(stages, server) Check if server has a at least one of the stage in the list. stages: stages (as list) to check.
server: server to check.
Boolean
AStages.serverHasAllStages(stages, server) Check if server has all server in the list. stages: stages (as list) to check.
server : server to check.
Boolean
AStages.getServerData(server) Get all stages that server unlocked. server: server. List

Documentation:

  1. Home

  2. Stages
    - Usage
    - Utils

  3. Restrictions
    - Crop
    - Dimension
    - Effect
    - Enchant
    - Item (Old)
    - Loot
    - Mob
    - Ore
    - Pet
    - Recipe
    - Region
    - Screen
    - Structure

  4. Addons
    - Curios API
    - Pufferfish Skill's

  5. Simple Restrictions (via commands)
    Brand new and intuitive way to add restriction!

  6. Developers
    - Plugin
    - Restrictions
    - Simple Restrictions
    - Stage System
    - Utils

  7. Q&A
    A place where questions are on the agenda!

  8. Changelogs
    Changelogs since 0.6.0 version!

  9. Version Comparisons

  10. What's Happened? (FLOP!)
    New code formatting is coming!

Clone this wiki locally