NetherGuard

NetherGuard

Prevent nether portal creation within player-defined regions.

33 downloads 1 followers

NetherGuard

Java Spigot License

在玩家划定的区域内阻止下界传送门生成
Prevent nether portal creation within player-defined regions.

一个轻量的 Minecraft 服务端插件,允许玩家用 /ng pos1、/ng pos2 划定区域,并阻止该区域内生成下界传送门。支持 SQLite / MySQL 存储、多语言(内置 zh_CN / zh_TW / en_US),采用异步单线程写入队列,保证数据一致性的同时不阻塞主线程。


目录


功能特性

  • 区域保护:玩家用两个对角点划定立方体区域,区域内禁止生成下界传送门。
  • 拦截事件:
    • 拦截 PortalCreateEvent(玩家点火、自然生成等)
    • 拦截 PlayerPortalEvent(玩家穿过传送门进入受保护区域)
  • 2D / 3D 模式:可配置忽略 Y 轴,整列高度都受保护。
  • 多存储后端:内置 SQLite,可选 MySQL。
  • 异步写入:所有 INSERT / DELETE 走单线程写入队列,避免 SQLite 锁冲突,不卡主线程。
  • 失败保守策略:数据库加载失败时默认"拒绝放行"(fail-closed),可配置。
  • i18n:内置简体中文、繁体中文、英文;支持自定义语言文件。
  • 每玩家区域上限:可配置最大区域数,OP 可绕过。

兼容性

项目 要求
服务端 Spigot / Paper 1.17+(api-version: 1.17)
Java 17+
依赖 无(SQLite / MySQL 驱动已 shade 进 jar)

已在 Purpur 1.21.8 上验证。


安装

  1. 从 Releases 下载最新 NetherGuard-x.x.x.jar。
  2. 放入服务端 plugins/ 目录。
  3. 重启服务器。
  4. 首次启动应会生成:
    plugins/NetherGuard/
    ├── config.yml
    ├── lang/
    │   ├── zh_CN.yml
    │   ├── zh_TW.yml
    │   └── en_US.yml
    └── regions.db        # SQLite 模式
    

快速开始

/ng pos1              # 站在第一个角,设置 pos1
/ng pos2              # 站在对角,设置 pos2
/ng create my_region  # 用当前选区创建名为 my_region 的区域
/ng list              # 查看自己的区域列表
/ng info my_region    # 查看区域详情
/ng delete my_region  # 删除区域

设置完成后,任何玩家在该区域内点燃下界传送门都会被阻止,穿过传送门进入该区域也会被拦截。


命令

主命令:/netherguard,别名 /ng。

命令 说明 权限
/ng pos1 设置第一个对角点 netherguard.use
/ng pos2 设置第二个对角点 netherguard.use
/ng create <名称> 用当前选区创建区域 netherguard.create
/ng delete <名称> 删除区域(自己 / 任意) netherguard.delete.own / netherguard.delete.any
/ng list [页码] 列出自己的区域 netherguard.use
/ng info <名称> 查看区域详情 netherguard.use
/ng cancel 清除当前选区 netherguard.use
/ng reload 从数据库重载缓存 netherguard.reload

不带子命令时显示帮助(帮助内容会根据权限过滤)。


权限

权限 说明 默认
netherguard.use 基础命令访问 所有人
netherguard.create 允许创建区域 所有人
netherguard.delete.own 允许删除自己的区域 所有人
netherguard.delete.any 允许删除任意区域 OP
netherguard.reload 允许重载缓存 OP
netherguard.limit.bypass 绕过每玩家区域上限 OP

NetherGuard

Prevent nether portal creation within player-defined regions. 在玩家划定的区域内阻止下界传送门生成

A lightweight Minecraft server plugin that allows players to define regions using /ng pos1 and /ng pos2, blocking nether portal generation inside those areas. Supports SQLite / MySQL storage, multi-language (built-in zh_CN / zh_TW / en_US), and uses an asynchronous single-thread write queue to ensure data consistency without blocking the main server thread.


Table of Contents


Features

  • Region Protection: Players define cuboid regions with two diagonal points. Nether portals cannot be created inside protected regions.
  • Event Interception:
    • Intercept PortalCreateEvent (player ignition, natural generation, etc.)
    • Intercept PlayerPortalEvent (players entering protected regions via nether portals)
  • 2D / 3D Mode: Configurable option to ignore the Y-axis, protecting the entire vertical column.
  • Multiple Storage Backends: SQLite by default, MySQL optional.
  • Asynchronous Writes: All INSERT / DELETE operations go through a single-thread write queue to avoid SQLite lock contention and prevent main thread blocking.
  • Fail-Closed Policy: Deny portal access by default if database fails to load; this behavior is configurable.
  • i18n Support: Built-in Simplified Chinese, Traditional Chinese, English; custom language files are supported.
  • Per-player Region Limit: Configurable maximum number of regions per player. Operators can bypass this limit.

Compatibility

Item Requirement
Server Spigot / Paper 1.17+ (api-version: 1.17)
Java 17+
Dependencies None (SQLite / MySQL drivers are shaded into the jar)

Verified on Purpur 1.21.8.


Installation

  1. Download the latest NetherGuard-x.x.x.jar from Releases.
  2. Place the jar into your server's plugins/ folder.
  3. Restart your server.
  4. On first startup, these files will be generated:
plugins/NetherGuard/
├── config.yml
├── lang/
│   ├── zh_CN.yml
│   ├── zh_TW.yml
│   └── en_US.yml
└── regions.db        # SQLite mode

Quick Start

/ng pos1              # Stand at your first corner and set pos1
/ng pos2              # Stand at the opposite diagonal and set pos2
/ng create my_region  # Create a region named my_region using your current selection
/ng list              # List all your regions
/ng info my_region    # View details of my_region
/ng delete my_region  # Delete my_region

Once configured, any player attempting to ignite a nether portal within this region will be blocked. Players will also be blocked if they attempt to enter the protected region via an existing nether portal.


Commands

Main command: /netherguard, alias /ng.

Command Description Permission
/ng pos1 Set the first diagonal position netherguard.use
/ng pos2 Set the second diagonal position netherguard.use
/ng create <name> Create a region from your current selection netherguard.create
/ng delete <name> Delete a region (own / any) netherguard.delete.own / netherguard.delete.any
/ng list [page] List your regions netherguard.use
/ng info <name> View region details netherguard.use
/ng cancel Clear your current selection netherguard.use
/ng reload Reload cached data from database netherguard.reload

Running the base command without subcommands shows help text, filtered according to the executor's permissions.


Permissions

Permission Description Default
netherguard.use Access to basic commands Everyone
netherguard.create Allow region creation Everyone
netherguard.delete.own Allow deleting your own regions Everyone
netherguard.delete.any Allow deleting any region OP
netherguard.reload Allow reloading cache OP
netherguard.limit.bypass Bypass per-player region limit OP

No gallery available for this project.

Version Minecraft Loader Download

NetherGuard 1.0.1

1.0.1

1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2, 26.3
bukkit, paper, purpur, spigot
Download