Skip to content

MipaSenpai/Polygons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

32 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Polygons Logo

๐Ÿ›ก๏ธ Polygons

Territory protection system for Endstone & LeviLamina servers

Typing SVG


โœจ 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

  1. Place a diamond block or stone (configurable) in the world
  2. Enter a unique name for your polygon
  3. 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 area

Permission 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


โœจ Polygons - Abandon all hope, ye who enter here. โœจ

About

Polygons - a territory protection system for Endstone & LeviLamina.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages