Zones API

Zones API

Server-side mod implementing zones with api in the game.

by
108 Downloads
fabriclibraryutility
Rent Server with this Mod

About this Mod

Zones API

Zones API is a lightweight system for defining and managing custom zones in a Minecraft server world. It provides core methods for creating rectangular areas (zones), checking whether entities or block positions are inside those zones, and removing zones by their identifiers.

This API serves as a foundation for implementing more complex features such as:

  • Region-based rules (e.g., PvP restrictions, building limits, protected areas)
  • Quest areas or custom interaction zones
  • Player or entity tracking by location
  • Custom game logic triggered by zone presence

Features:

  • Supports overlapping zones
  • Simple zone creation using two corner points (BlockPos)
  • Zone identification via unique Identifier objects
  • Membership checks based on either position or entity

Zones API does not implement high-level behaviors on its own — instead, it is intended to be integrated into larger systems or extended as needed. It provides the basic spatial logic upon which other features can be built.

API Reference

package com.yeekworld.zones.api.ZonesAPI

Add dependency via JitPack: https://jitpack.io/#Wolframoviy/Zones-API (use modImplementation instead of implementation)

isInZone(ServerWorld world, BlockPos pos, Identifier zoneId)

Checks whether a specific block position is within a given zone.

Parameter Type Description
world ServerWorld The world in which the check is performed.
pos BlockPos The position to check.
zoneId Identifier The unique identifier of the zone.
Returns Description
boolean true if the position is inside the zone, otherwise false.

isInZone(Entity entity, Identifier zoneId)

Checks whether an entity is inside a specific zone.

Parameter Type Description
entity Entity The entity to check.
zoneId Identifier The identifier of the target zone.
Returns Description
boolean true if the entity is inside the zone, otherwise false.

getZoneWhereIn(ServerWorld world, BlockPos pos)

Gets a list of zone identifiers that the given block position belongs to.

Parameter Type Description
world ServerWorld The world of the position.
pos BlockPos The position to check.
Returns Description
List<Identifier> List of all zones containing the position. Empty if none.

getZoneWhereIn(Entity entity)

Gets a list of zone identifiers that the entity is currently inside.

Parameter Type Description
entity Entity The entity to check.
Returns Description
List<Identifier> List of all zones containing the entity. Empty if none.

createZone(String zoneName, BlockPos pos1, BlockPos pos2, ServerWorld world)

Creates a rectangular zone defined by two opposite corners.

Parameter Type Description
zoneName String The name of the zone (used in the ID).
pos1 BlockPos One corner of the zone.
pos2 BlockPos Opposite corner of the zone.
world ServerWorld The world where the zone is created.
Returns Description
Identifier The identifier of the new zone.

removeZone(Identifier zoneId)

Removes the zone with the given identifier.

Parameter Type Description
zoneId Identifier The ID of the zone to remove.
Returns Description
void No return value.

ℹ️ Notes

  • Zones can overlap; an entity or position may belong to multiple zones.
  • Zone boundaries are inclusive.
  • Identifiers (Identifier) should be globally unique.

Available Versions

Zones API v1.2.3release
MC 1.21.8fabric
August 6, 2025
Zones API v1.2.2 REFACTOREDrelease
MC 1.21.8fabric
August 6, 2025
v1.2.2release
MC 1.21.8fabric
August 4, 2025

How to Install Zones API on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.8).

3

Install Mod

Open the mod browser in the dashboard and search for "Zones API". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

1.21.8

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

Zones API server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.8). You can switch loaders with one click in the panel.

Is Zones API compatible with fabric?

Zones API officially supports fabric for Minecraft 1.21.8. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with Zones API – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Zones API consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install Zones API with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
MIT License
Server-side
Required

Supported Versions

1.21.8