Skip to content

Zone file

One AFK zone per zones/<id>.yml file, with its area, permission, priority, enter and leave actions and reward tracks.

Every zone has its own file in the zones/ folder. The file name without .yml is the zone id used in commands and placeholders (zones/spawn-afk.yml is the zone spawn-afk). After changing a file, use /szpontafkzone reload.

Key Default Description
enabled true Turns the zone on or off without deleting the file. A disabled zone counts nobody and gives no rewards.
display-name the zone id Name of the zone shown to players as {zone_name}.
priority 0 When zones overlap, a player counts only in the zone with the highest priority. With equal priorities, the id that comes first alphabetically wins. Any whole number.
permission '' Permission needed to count in this zone, e.g. szpontafkzone.zone.vip. Players without it are treated as if they were outside the zone. '' means every player.
Key Default Description
type CUBOID CUBOID is the box between pos1 and pos2; both corner blocks are part of the zone. WORLDGUARD is an existing WorldGuard region named in worldguard-id.
world required Name of the world, e.g. world or world_nether.
pos1, pos2 Corners of the area (CUBOID only), in block coordinates: x, y, z.
worldguard-id '' Id of the WorldGuard region (WORLDGUARD only), e.g. spawn-afk.
region:
type: CUBOID
world: world
pos1:
x: 0
y: 64
z: 0
pos2:
x: 5
y: 69
z: 5
worldguard-id: ''

There are two ways to change a CUBOID area in game:

  • stand in a corner and use /szpontafkzone set <zone> pos1 (or pos2);
  • select both corners with the wand and use /szpontafkzone set <zone> selection.
Key Default Description
enter-actions [] Actions run when a player starts counting in this zone: walks or teleports into it, or joins the server inside it.
leave-actions [] Actions run when a player stops counting in this zone, e.g. walks or teleports out of it. Not run when the player logs out.

Placeholders: {player}, {uuid}, {zone}, {zone_name}, {prefix}.

enter-actions:
- '[message] {prefix}You are in &f{zone_name}&7. Stay here to earn rewards.'
leave-actions:
- '[actionbar] &7You left &f{zone_name}&7.'

The syntax of the lines is described in Actions.

The rewards section holds the reward tracks of the zone, each with its own timer, displays and tiers. They are described in Reward tracks and tiers and Boss bar, action bar and title.