Polygonsv1.0.1
Pythonby MipaSenpaiPolygons - a territory protection system for Endstone & LeviLamina.
pip install https://github.com/MipaSenpai/Polygons/releases/download/v1.0.1/endstone_polygons-1.0.1-py2.py3-none-any.whl- Stars
- 3
PLUGINSPOLYGONS
# Install
Use the animation for reference. Follow the plugin's README for exact steps.
# README
What is Polygons?
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.
Key Features
Lightning Fast
R-tree spatial indexing ensures instant polygon lookups even with thousands of protected areas. No lag, no delays.
Database Flexibility
Choose your storage: SQLite, MySQL, or PostgreSQL. Switch between them with a single config change.
Smart Caching
In-memory cache with automatic synchronization keeps queries fast and data consistent across restarts.
One-Command Management
/polygon — that's it. Create, configure, and manage all your territories through one intuitive command with form-based UI.
Member Management
Add friends to your polygon, configure granular permissions, and control who can build, break, or access chests.
Customizable Sizes
Define polygon sizes per block type.
Installation
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!
Usage
Visual Borders
To visualize polygon boundaries in-game, install the Resource pack.
Creating a Polygon
- Place a diamond block or stone (configurable) in the world
- Enter a unique name for your polygon
- Your territory is now protected!
Managing Polygons
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) |
Configuration
Edit plugins/polygons/config.toml:
Database Settings
[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!
Polygon Types
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 areaPermission Flags
Each 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.
Performance Benchmarks
Cache Loading & Memory
| 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 |
Game Actions (average response time)
| 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.
Protection Features
- Prevents unauthorized block placement
- Prevents unauthorized block breaking
- Checks polygon boundaries in 3D space
- Protects chests, barrels, shulker boxes, ender chests
Contributing
Contributions are welcome! Fork the repo, make your changes, and open a Pull Request.
License
This project is licensed under the MIT License. See LICENSE for details.
Tech Stack
Not an official Minecraft product. Not approved by or associated with Mojang or Microsoft.
Not an official Minecraft product. Not approved by or associated with Mojang or Microsoft.