# Commands Two commands: `/chain` and `/unchain`. ## Chaining things together Chain yourself to the nearest pig: ``` /chain @e[type=pig,limit=1,sort=nearest] ``` Chain something to several things at once. Here, one zombie gets chained to every player within 20 blocks: ``` /chain @e[type=zombie,limit=1] @a[distance=..20] ``` The one-argument form chains *you* to the target, so it only works in game. The two-argument form works from console too. ## Breaking a chain ``` /unchain @s you /unchain @a everyone /unchain @e[type=pig] every pig ``` If whatever you target isn't chained, Chain will say so. ## Changing the distance ``` /chain set_max_distance 5 ``` Anything from 0 to 64 blocks. It saves straight to the config, so it survives a restart. Edited the config by hand instead? Pick it up without restarting: ``` /chain reload ``` ## Checking the version ``` /chain version ``` ## Permissions | Permission | Covers | |---|---| | `lodestone.chain.commands.chain` | `/chain` and everything under it | | `lodestone.chain.commands.unchain` | `/unchain` | `/chain version` needs no permission. ## Related Pages - [[Chain/Server Owners/Overview]], what Chain does - [[Chain/Server Owners/Configuration]], the config file