Skip to content

Creating AFK Zones

Select a region with the wand, create AFK zones in-game and tune their rewards.

Zones are created in-game - no coordinates to type, no restart. You need optimalafkzone.admin.

/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.

/afkzoneadmin create spawn

The 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 and a display name (&d&lSpawn) into it, and saves it 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.

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.

Full field list: zones reference.

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.

/afkzoneadmin list # every zone, its world, timer and occupants
/afkzoneadmin tp spawn # teleport to the top centre of the zone
/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 Region corners in the zone file and reload, or delete the zone and create it again from a new selection.
  • Disabling without deleting: Settings.Enabled: false keeps the file but nobody can enter the zone.
  • 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’s Leave-Actions and the second zone’s Enter-Actions.
  • Files starting with _ in zones/ 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’s Region.