Territory protection system for Endstone & LeviLamina servers
Polygons is a lightweight, high-performance territory protection plugin for Minecraft Bedrock servers running on Endstone & LeviLamina. Create protected zones with a single block placement, manage permissions through intuitive forms, and enjoy blazing-fast spatial queries powered by R-tree indexing.
๐ One command. Multiple databases. Zero lag.
No complex setup. No performance overhead. Just protection.
|
R-tree spatial indexing ensures instant polygon lookups even with thousands of protected areas. No lag, no delays. Choose your storage: SQLite, MySQL, or PostgreSQL. Switch between them with a single config change. In-memory cache with automatic synchronization keeps queries fast and data consistent across restarts. |
Add friends to your polygon, configure granular permissions, and control who can build, break, or access chests. Define polygon sizes per block type. |
Download the latest plugin file from Releases and place it in your server's plugins folder. Restart the server.
For LeviLamina: You need to have LeviStone installed.
Restart your server. Done!
To visualize polygon boundaries in-game, install the Resource pack.
- Place a diamond block or stone (configurable) in the world
- Enter a unique name for your polygon
- Your territory is now protected!
Use the /polygon (or /pg) command to open the management menu:
| Action | Description |
|---|---|
| View Polygons | List all your protected territories |
| Manage Flags | Configure break/place/chest permissions |
| Add Member | Invite players to your polygon |
| Remove Member | Revoke access from players |
| Delete Polygon | Remove protection (owner only) |
Edit plugins/polygons/config.toml:
[database]
type = "sqlite" # Options: "sqlite", "mysql", "postgresql"
[database.sqlite]
filename = "polygons.db"
[database.mysql]
host = "localhost"
port = 3306
username = "root"
password = "password"
database = "polygons"
[database.postgresql]
host = "localhost"
port = 5432
username = "postgres"
password = "password"
database = "polygons"Switch databases anytime โ just change the type field and restart!
Define which blocks create polygons and their sizes:
[polygonTypes]
"minecraft:diamond_block" = 7 # 7x7x7 area
"minecraft:stone" = 9 # 9x9x9 area
"minecraft:gold_block" = 15 # 15x15x15 areaEach polygon has three configurable flags:
| Flag | Description | Default |
|---|---|---|
canBreak |
Allow non-members to break blocks | false |
canPlace |
Allow non-members to place blocks | false |
canOpenChests |
Allow non-members to open containers | false |
Owners and members always have full access.
| Polygons | Load Time | Memory Usage | Lookup Speed |
|---|---|---|---|
| 100 | 0.003s | 2.1 MB | 0.020 ms |
| 1,000 | 0.029s | 9.3 MB | 0.020 ms |
| 10,000 | 0.718s | 109.8 MB | 0.025 ms |
| 50,000 | 3.908s | 499.7 MB | 0.032 ms |
| Polygons | Block Break | Block Place | Chest Access |
|---|---|---|---|
| 100 | 0.021 ms | 0.021 ms | 0.021 ms |
| 1,000 | 0.022 ms | 0.024 ms | 0.021 ms |
| 10,000 | 0.030 ms | 0.028 ms | 0.027 ms |
| 50,000 | 0.034 ms | 0.028 ms | 0.042 ms |
Maximum throughput: 28,839 actions/second
Even with 50,000 polygons, all actions complete in under 0.05ms. Zero lag guaranteed.
- Prevents unauthorized block placement
- Prevents unauthorized block breaking
- Checks polygon boundaries in 3D space
- Protects chests, barrels, shulker boxes, ender chests
Contributions are welcome! Fork the repo, make your changes, and open a Pull Request.
This project is licensed under the MIT License. See LICENSE for details.
โจ Polygons - Abandon all hope, ye who enter here. โจ
