-
Notifications
You must be signed in to change notification settings - Fork 9
AStages Dimension Restriction
Dimension Restrictions enable you to control player access to specific dimensions within the game world. These restrictions can be applied to teleportation, allowing for customized progression paths, lore-driven gameplay, or restricted areas for events or challenges.
| Method | Description | Parameters | Returns |
|---|---|---|---|
AStages.addRestrictionForDimension(id, stage, dimension) |
Create and add generic dimension restriction. |
id: arbitrary string used as identifier.stage: progression stage.dimension: dimension to be restricted. |
ADimensionRestriction |
Caution
All informations in this section must be referred to versione above 1.2.0!
A brand new way to interact with dimension was added! Now developers, rather than totally restrict a dimension, can now set a timer for exploring that and a maximum number of access to the dimension!
AStages.addRestrictionForDimension("astages/dimension", "stage_dimension", "minecraft:the_nether")
.setMaxStayTimer(ATime("20s")) // DEFAULT: null -> dimension completely restricted if this value is not set!
.setMaxAccess(2) // DEFAULT: 1
.setExpiredDimensionMessage(...) // You can also set a custom message when player CANNOT access this dimension!
.setTimerFormatting("green") // DEFAULT: Gold
// ATime class accepts real-life hours, minutes and seconds, in this format (and so on!):
ATime("30s")
ATime("1m 50s")
ATime("2m")
ATime("1h 5m")
ATime("1h 10m 20s")There are also new commands for resetting and manipulating data!
'astages timer reset_all <players> <restriction_id>'
'astages timer reset_access <players> <restriction_id>'
'astages timer reset_timer <players> <restriction_id>'
'astages timer set_timer <players> <restriction_id> <value>' // Timers are in TICKS!
'astages timer set_access <players> <restriction_id> <value>'// Server Script Folder -> file.js (arbitrary file name).
AStages.addRestrictionForDimension("astages/dimension", "stage_dimension", "minecraft:the_nether")Note
You don't need to set all properties for each restriction: changes should be done only when you want to modify default values!
// Server Script Folder -> file.js (arbitrary file name).
AStages.addRestrictionForDimension("astages/dimension", "stage_dimension", "minecraft:the_nether")
.setBidirectional(false) // restrict go to and come from the dimension restricted
.setDimensionMessage(dimension => Component.literal("Custom message for dimension ").append(dimension).withStyle("green"))
.setLeaveDimensionMessage(dimension => ...)Documentation:
-
Restrictions
- Crop
- Dimension
- Effect
- Enchant
- Item (Old)
- Loot
- Mob
- Ore
- Pet
- Recipe
- Region
- Screen
- Structure -
Addons
- Curios API
- Pufferfish Skill's -
Simple Restrictions (via commands)
Brand new and intuitive way to add restriction! -
Developers
- Plugin
- Restrictions
- Simple Restrictions
- Stage System
- Utils -
Q&A
A place where questions are on the agenda! -
Changelogs
Changelogs since 0.6.0 version! -
What's Happened? (FLOP!)
New code formatting is coming!