Component Blocker removes entities and items completely from the game. This plugin is for server owners who want to restrict the availability of items or entities in the game world.
Items are not entities, and only exist in containers, inventory, or (temporarily) on the ground (in a "bag"). For admins, the items will still appear in the console but may not be created until they are unblocked.
The block list is very permissive and checks a variety of properties to determine candidates for deletion. The blocking behavior does not differentiate between items and blueprints, they are both removed.
If you use Crafting Controller, disable "craftRefund" in ComponentBlocker.json and block items with both plugins or you well get double resources refunded.
Adding an item by shortname to the block list:
Removing block by running the exact same command:
Alternatively, adding an item by full name:
Please note the quotations, they are necessary for names that include spaces.
Adding an entity by resource path to block list:
Blocking structure tiers will prevent players from upgrading to any given tier
Blocking collectible (stone/wood/ore):
Viewing everything currently on the block list:
From server console:
An example of an item that matches this criteria is "pants". Adding the default pants to your inventory and after using the /listinv command, you can identify the name to block this specific item name without blocking all items with "pants" in the name.
Features
- Remove any item or game object from the world
- Configurable messages and localization
- Ingredient refund on crafting of blocked item
- Block structure upgrades to any tier (configurable)
Notes
Entities include in-game prefabs such as rocks, trees, or buildings. These may be blocked using the entity asset resource path, qualified or unqualified. Note: Prefabs generated by procgen may not be removed, this includes large rocks, radtowns, mountains, sphere tank, etc.Items are not entities, and only exist in containers, inventory, or (temporarily) on the ground (in a "bag"). For admins, the items will still appear in the console but may not be created until they are unblocked.
The block list is very permissive and checks a variety of properties to determine candidates for deletion. The blocking behavior does not differentiate between items and blueprints, they are both removed.
If you use Crafting Controller, disable "craftRefund" in ComponentBlocker.json and block items with both plugins or you well get double resources refunded.
Commands
This plugin provides both chat and console commands using the same syntax. When using a command in chat, prefix it with a forward slash: `/`.- blocker [term] -- Blocks item, entity, construction grade or asset path.
- blocklist -- Print everything currently in the block list.
- listinv [term] -- List itemMod specifications for all inventory items (or inventory items with itemMods with names that match the search terms)
Usage
The blocker chat command is a toggled list, meaning that using the same command again will remove the item from the list.Adding an item by shortname to the block list:
Removing block by running the exact same command:
Alternatively, adding an item by full name:
Please note the quotations, they are necessary for names that include spaces.
Adding an entity by resource path to block list:
Blocking structure tiers will prevent players from upgrading to any given tier
Blocking collectible (stone/wood/ore):
Viewing everything currently on the block list:
From server console:
Permissive Blocking Behavior
When blocking an item by name where multiple items match said name, use the /listinv command to find more specific names depending on item skin or classification.An example of an item that matches this criteria is "pants". Adding the default pants to your inventory and after using the /listinv command, you can identify the name to block this specific item name without blocking all items with "pants" in the name.
Hooks Used
The following hooks are affected by this mod:- OnItemCraft
- OnEntitySpawned
- OnItemAddedToContainer
- OnItemDeployed
- OnPlantGather
- OnQuarryGather
- OnStructureUpgrade