-
Notifications
You must be signed in to change notification settings - Fork 9
AStages Enchant Restriction
Enchant Restrictions automatically remove forbidden enchantments from items that enter the player's inventory, hide them from the enchanting table, and prevent the use of restricted enchanted books in the anvil.
| Method | Description | Parameters | Returns |
|---|---|---|---|
AStages.addRestrictionForEnchant(id, stage, enchantment) |
Create and add generic enchant restriction. |
id: arbitrary string used as identifier.stage: progression stage.enchantment : enchant to be restricted. |
AEnchantRestriction |
AStages.addRestrictionForEnchant(id, stage, enchantment, compareCondition, level) |
Create and add more concisely enchant restriction. |
id: arbitrary string used as identifier.stage: progression stage.enchantment: enchant to be restricted.compareCondition: condition to be applied for level checking.level: level to be checked. |
AEnchantRestriction |
Tip
To define in a more precise way some restriction, you can use ACompareCondition enum provided by AStages to lock, for instance, the enchantment will be restricted only if its level is under 4. ACompareCondition could be: "equal", "less", "less_equal", "great", "great_equal".
// Server Script Folder -> file.js (arbitrary file name).
AStages.addRestrictionForEnchant("astages/crop1", "stage_crop", "minecraft:protection")
AStages.addRestrictionForEnchant("astages/crop2", "stage_crop", "minecraft:protection", "less", 4)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!