Creating AFK Zones
Select a region with the wand, create AFK zones in-game, set their spawn and tune their rewards.
Zones are created in-game, with no coordinates to type and no restart. You need
optimalafkzone.admin.
1. Get the wand
Section titled “1. Get the wand”/afkzoneadmin wand- Left-click a block → position 1
- Right-click a block → position 2
Each click sends POSITION-SET and plays the WAND-SELECT sound. The two positions are opposite
corners of a cuboid, and a live particle outline follows your selection. Breaking blocks with the wand
in hand is blocked, so a left-click never destroys the corner you picked.
A player counts as inside the zone when the block at their feet is inside the cuboid (both corners included). Pick corners that cover the floor and enough height above it.
2. Create the zone
Section titled “2. Create the zone”Stand inside your selection, where players should arrive, and run:
/afkzoneadmin create spawnThe zone id may use lowercase letters, digits, _ and -, up to 32 characters. Both positions must
be set and in the same world.
The plugin takes its built-in zone template, writes your Region, a display name (&d&lSpawn) and,
because you stand inside the region, a Spawn at your position and facing. It saves the result as
zones/spawn.yml. The zone is live immediately: stand inside to see the enter message, the action bar
and the boss bar countdown. Your selection is cleared.
3. Set the spawn
Section titled “3. Set the spawn”Players can only teleport to zones that have a spawn. If you ran create from outside the
selection, the zone has none yet and you get ZONE-CREATED-NO-SPAWN as a reminder. Walk into the zone
and run:
/afkzoneadmin setspawn spawnThe spawn is your exact position and facing. It has to be inside the zone, or you get
SPAWN-OUTSIDE-ZONE. Run it again at any time to move the spawn. /afkzoneadmin list shows which
zones still have no spawn.
A zone without a spawn still works for players who walk in. It is just not offered by /afkzone, the
AFK Zones menu or auto-AFK. See Teleports & Auto-AFK.
4. Tune the zone file
Section titled “4. Tune the zone file”Open zones/spawn.yml and change what you need, then run /afkzoneadmin reload. The most common
edits:
Settings: Display-Name: "&d&lSpawn AFK" Reward-Time: 300 # pay every 5 minutes Reward-Mode: "Both" # Shards, Commands or Both Permission: "" # e.g. "afk.vip" for a VIP-only zone
Shards: Enabled: true Amount: 5 # shards per payout, before boosters Chance: 100.0
Rewards: money: Chance: 80 Actions: - "eco give %player% 250" key: Chance: 20 Actions: - "crates key give %player% vote 1" - "[message] &5[&d&lAFK&5] &7You found a &dVote Key&7!"Players keep their progress across a reload. Changes, including an added or removed Permission,
apply on the next tick.
To give the zone its own icon in the AFK Zones menu, add an Icon item to the file, see the
zones reference.
Reward modes
Section titled “Reward modes”Reward-Mode |
Each payout |
|---|---|
Shards |
Only the zone’s Shards payout. |
Commands |
Only the zone’s Rewards. |
Both |
Shards, then Rewards. |
With Random-Rewards: true one reward group is rolled by Chance (a weight, not a percentage);
with false every group runs on every payout.
If Shards.Enabled is false in config.yml, shards
are off server-wide and every zone always runs its Rewards, whatever its mode.
Managing zones
Section titled “Managing zones”/afkzoneadmin list # every zone, its world, timer, occupants and spawn/afkzoneadmin tp spawn # teleport to the zone's spawn (or the top centre without one)/afkzoneadmin setspawn spawn # move the spawn to where you stand/afkzoneadmin outline spawn # toggle the zone's particle outline for yourself/afkzoneadmin delete spawn # delete the zone and its file/afkzoneadmin reload # apply config edits, keeps active sessions- Resizing: edit the
Regioncorners in the zone file and reload, or delete the zone and create it again from a new selection. Make sure theSpawnis still inside. - Disabling without deleting:
Settings.Enabled: falsekeeps the file, but nobody can enter the zone and it is not offered to players. - Overlaps: a player is only ever in one zone, the one with the higher
Settings.Priority. Moving from one zone into another runs the first zone’sLeave-Actionsand the second zone’sEnter-Actions. - Files starting with
_inzones/are ignored, so you can park a copy as_spawn.yml. - Broken zone files are skipped with a console error naming the file and the problem. The other zones still load.
- The template is built in. New zones always start from the plugin’s own template, not from a
file in
zones/. To give a new zone the settings of an existing one, copy the sections you want from the old file into the new one, keeping the new file’sRegionandSpawn.
