π Restricted Actions
There are two types of actions that can be restricted:
π Regular Actions
These check whether a block or item is unlocked during specific player behavior:
- Placing block β Is the block the player is placing unlocked?
- Breaking block β Is the block the player is breaking unlocked?
- Crafting item β Is the item the player is crafting unlocked?
- Potion consuming β Is the potion effect of the potion the player is consuming unlocked?
- Equipping armor β Is the armor piece the player is equipping unlocked?
- Shooting projectiles β Is the specific type of projectile the player is using unlocked?
- Entering portals β Are portals (
NETHER_PORTAL,END_PORTAL) unlocked for players?
βοΈ Config Examples
These are examples from xpmode.yml and farmingmode.yml.
πΉ xpmode.yml
Recipes:
level1:
needed_xp: 0
items:
- WOODEN_TOOLS
- WOODEN_SWORD
- STONE_SWORD
- CHEST
- STICK
- PLANKS
- FURNACE
- CRAFTING_TABLE
- TORCH
entities_actions:
- shear #Player can shear sheep
πΈ farmingmode.yml
unlocks:
firstUnlock:
name: First Unlock
unlocks:
- STONE_TOOLS
- STONE_SWORD
- LEATHER_ARMOR
- STONES
- FISHING_ROD
- BEDS
- DYES
entities_actions:
- shear #Player can shear sheep
πΎ EntityActions
Other actions can also have level requirements and are defined in either xpmode.yml or farmingmode.yml.
shearβ Player is allowed to shear sheepvillagerTradesβ Player is allowed to trade with villagersmobFeedβ Allows feeding all mobs- Can also be specified as
<entity>Feed, e.g.sheepFeed,cowFeed, etc.
- Can also be specified as