DontSpawn (Paper 插件)
DontSpawn 是一款轻量但功能强大的 Paper 插件,提供对实体生成的高级、细粒度控制。
你可以创建灵活的规则,以阻止全局或基于特定上下文(如世界、生物群系、区域或生成原因)的实体生成——所有操作均通过简洁直观的 /dt 命令系统进行管理。
专为现代 Paper 服务器设计,兼顾性能与可扩展性。
功能
- 按范围限制实体生成:
- 全局
- 世界
- 生物群系
- 区域
- 生成原因 (SpawnReason)
- 使用魔杖进行区域选择,无需手动输入坐标。
- 为每位玩家提供独立的区域边界粒子预览(仅查看者可见)。
- 持久化 JSON 存储(
regions.json, rules.json)。
- 针对高性能服务器优化的生成监听器。
- 清晰、结构化的命令架构。
依赖要求
- 服务器: Paper(Minecraft 1.21.x,已在 1.21.1 上测试)
- Java: 推荐 Java 21(适用于 1.21.x 服务器)
安装
- 下载插件
.jar 文件。
- 将其放入服务器的
plugins/ 文件夹中。
- 重启服务器。
- 使用
/dt 管理规则和区域。
命令
主命令:
/dontspawn
别名:
/dt, /ds
生成规则
/dt disable <global|world|region|biome|reason> <实体> [值]
/dt enable <global|world|region|biome|reason> <实体> [值]
/dt list
/dt info
/dt reload
示例
/dt disable global ZOMBIE
/dt disable world SKELETON world
/dt disable biome SPIDER PLAINS
/dt disable reason ZOMBIE SPAWNER
/dt disable region CREEPER spawn
使用 enable 并传入相同的参数即可撤销一条规则。
区域(魔杖 + 预览)
/dt wand
- 左击一个方块 → 位置 1
- 右击一个方块 → 位置 2
在选定两个角点后,插件将引导你完成区域的最终确认与保存。
/dt view
使用粒子轮廓为自己切换区域边界可视化。
权限
权限使用 dontspawn.* 命名空间,包括:
dontspawn.disable
dontspawn.enable
dontspawn.wand
dontspawn.view
dontspawn.reload
- 以及其他按需添加的权限
数据文件
DontSpawn 将其持久化数据存储在其插件文件夹中:
regions.json — 已保存的区域
rules.json — 已保存的生成规则
支持与问题反馈
源代码:
错误报告:
报告问题时,请包含以下内容:
- Paper 构建/版本
- 插件版本
- 完整的控制台堆栈跟踪
- 复现步骤
DontSpawn (Paper Plugin)
DontSpawn is a lightweight yet powerful Paper plugin that provides advanced, fine-grained control over entity spawning.
Create flexible rules to block spawns globally or based on specific contexts such as world, biome, region, or spawn reason — all managed through a clean and intuitive /dt command system.
Built for modern Paper servers with performance and scalability in mind.
Features
- Block entity spawns by scope:
- Global
- World
- Biome
- Region
- SpawnReason
- Region selection system with a wand (no manual coordinate typing).
- Per-player region border preview using particles (only visible to the viewing player).
- Persistent JSON storage (
regions.json, rules.json).
- Optimized spawn listener designed for high-performance servers.
- Clean, structured command architecture.
Requirements
- Server: Paper (Minecraft 1.21.x, tested on 1.21.1)
- Java: Java 21 recommended for 1.21.x servers
Installation
- Download the plugin
.jar file.
- Place it inside your server’s
plugins/ folder.
- Restart the server.
- Use
/dt to manage rules and regions.
Commands
Main command:
/dontspawn
Aliases:
/dt, /ds
Spawn Rules
/dt disable <global|world|region|biome|reason> <entity> [value]
/dt enable <global|world|region|biome|reason> <entity> [value]
/dt list
/dt info
/dt reload
Examples
/dt disable global ZOMBIE
/dt disable world SKELETON world
/dt disable biome SPIDER PLAINS
/dt disable reason ZOMBIE SPAWNER
/dt disable region CREEPER spawn
Use enable with the same arguments to revert a rule.
Regions (Wand + Preview)
/dt wand
- Left-click a block → Position 1
- Right-click a block → Position 2
After selecting both corners, the plugin will guide you to finalize and save the region.
/dt view
Toggle region border visualization for yourself using particle outlines.
Permissions
Permissions use the dontspawn.* namespace, including:
dontspawn.disable
dontspawn.enable
dontspawn.wand
dontspawn.view
dontspawn.reload
- and others as needed
Data Files
DontSpawn stores persistent data inside its plugin folder:
regions.json — Saved regions
rules.json — Saved spawn rules
Support & Issues
Source Code:
Bug Reports:
When reporting an issue, please include:
- Paper build/version
- Plugin version
- Full console stacktrace
- Steps to reproduce
评论 0
登录后参与评分
还没有评论,来抢沙发吧