### Anti-Grief Tool: Admin Stick Source: https://daqem.com/projects/item-restrictions/wiki/examples Prevents breaking any block if the player is holding a specific 'Admin' stick, identified by its display name. This is useful for protecting builds. ```json { "icon": { "id": "minecraft:stick" }, "types": [ "cant_item_break_block" ], "conditions": [ { "type": "arc:item_in_hand", "item": { "id": "minecraft:stick", "components": { "minecraft:display_name": { "name": "{\"text\":\"Admin Stick\",\"color\":\"red\",\"italic\":false}" } } } } ] } ``` -------------------------------- ### Restrict Stone or Dirt in Overworld/Nether Source: https://daqem.com/projects/item-restrictions/wiki/examples Restricts crafting of stone or any dirt variant (using item tags) if the player is in either the Overworld or the Nether. Demonstrates logical OR conditions. ```json { "icon": { "id": "minecraft:barrier" }, "types": [ "cant_craft" ], "conditions": [ { "type": "arc:items", "items": [ "minecraft:stone", // Stone "#minecraft:dirt" // dirt item tag, any dirt variant (coarse dirt, podzol, etc.) ] } { "type": "arc:or", "conditions": [ { "type": "arc:dimension", "dimension": "minecraft:overworld" }, { "type": "arc:dimension", "dimension": "minecraft:the_nether" } ] } ] } ``` -------------------------------- ### Disable Brewing Swiftness Potions Source: https://daqem.com/projects/item-restrictions/wiki/examples Prevents players from brewing any potion that contains the 'Swiftness' effect. This targets specific potion components. ```json { "icon": { "id": "minecraft:potion", "components": { "minecraft:potion_contents": { "potion": "minecraft:swiftness" } } }, "types": [ "cant_brew" ], "conditions": [ { "type": "arc:item", "item": { "id": "minecraft:potion", "components": { "minecraft:potion_contents": { "potion": "minecraft:swiftness" } } } } ] } ``` -------------------------------- ### Item Restriction JSON Structure Source: https://daqem.com/projects/item-restrictions/wiki/creating-restrictions/file-structure Defines an item restriction with an icon, client-side check, types of restrictions, and conditions. ```json { "icon": { "id": "minecraft:barrier" }, "client_side": true, "types": [ "cant_craft", "cant_use_item" ], "conditions": [ { "type": "arc:item", "item": { "id": "minecraft:diamond_sword" } } ] } ``` -------------------------------- ### Restrict Diamond Sword by Job Level Source: https://daqem.com/projects/item-restrictions/wiki/examples Prevents crafting, using, or hurting entities with a Diamond Sword unless the player is at least level 30 in the Hunter job. Requires the JobsPlus plugin. ```json { "icon": { "id": "minecraft:diamond_sword" }, "types": [ "cant_craft", "cant_use_item", "cant_hurt_entity", "cant_repair", "cant_enchant" ], "conditions": [ { "type": "arc:item", "item": { "id": "minecraft:diamond_sword" } }, { "type": "jobsplus:job_level", "inverted": true, // Restrict if NOT at level 30 "job": "jobsplus:hunter", "level": 30 } ] } ``` -------------------------------- ### Exclude Restrictions in YAML Source: https://daqem.com/projects/item-restrictions/wiki/getting-started/configuration Use the `excluded_restrictions` list in `item-restrictions-common.yaml` to temporarily disable specific restriction IDs without deleting their configuration files. This is useful for disabling restrictions from modpacks or for testing purposes. ```yaml restrictions: # A list of restriction IDs to exclude from the game. # Format: [':'] excluded_restrictions: - "itemrestrictions:diamond_sword_usage" - "packname:disable_tnt" ``` -------------------------------- ### Prevent TNT Placement in Overworld Source: https://daqem.com/projects/item-restrictions/wiki/examples Prevents players from placing TNT blocks, but only when they are in the Overworld dimension. Uses the arc:dimension condition. ```json { "icon": { "id": "minecraft:tnt" }, "types": [ "cant_place_block" ], "conditions": [ { "type": "arc:item", "item": { "id": "minecraft:tnt" } }, { "type": "arc:dimension", "dimension": "minecraft:overworld" } ] } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.