CaptureSpawn
一个 Paper 插件,允许你“将生物捕获进精灵球”,并通过右键点击或基于物理的投掷来释放它们。它尽可能保留实体的 NBT 数据,并模拟更真实的投射物行为(重力 / 弹跳 / 滚动 / 存活时间)。
- 运行环境:Paper 26.1
- 必需依赖:PacketEvents、NBTAPI (Item-NBT-API plugin)
- 许可证:MIT (LICENSE)
功能特性
- 通过压缩的 NBT 存储(GZIP + Base64)及必要的清理来捕获和释放生物,以降低体积风险
- THROW 模式:表现如同真实投射物;仅在碰撞时捕获;可在地面弹跳/滚动;超时后自动回收
- 精灵球物品支持自定义玩家头像纹理,以及可配置的名称/描述/发光效果/自定义模型数据
- 为常见生物丰富描述信息(如村民职业/等级、羊的颜色、猫的品种、狼项圈/驯服状态等)
- 兼容保护插件:可选检查“建造权限”以在受保护区域防止滥用捕获/释放操作
- 本地持久化日志,支持按时间范围查询(类 CO 的时间过滤)
快速开始
- 安装依赖:PacketEvents、NBTAPI (Item-NBT-API plugin)
- 将 CaptureSpawn 放入
plugins/ 目录,启动服务器一次以生成配置文件
- 编辑
plugins/CaptureSpawn/config.yml
默认交互模式为 THROW(可在配置文件中改回 DIRECT)。
命令
/capturespawn reload 重新加载配置和监听器
/capturespawn log <player|me> <from> [to] [release|capture|all] [limit]
- 时间示例:
10m 1h 2d 1w 1h30m
- 示例:
/capturespawn log me 10m all 50
/capturespawn log steve 3d 1d release 100
权限
capturespawn.capture 捕获权限
capturespawn.release 释放权限
capturespawn.bypass.blacklist 绕过捕获黑名单
capturespawn.craft 合成权限(可选)
capturespawn.reload 重载权限(默认:OP)
capturespawn.log 日志查询权限(默认:OP)
配置说明
plugins/CaptureSpawn/config.yml(概览)
interaction-mode: THROW | DIRECT
throw.physics.*:空气阻力 / 弹跳恢复系数 / 摩擦力 / 最大弹跳次数 / 最低速度阈值
storage.nbt-format: GZIP_BASE64 + storage.max-bytes:控制载荷大小
protection.capture-requires-build / protection.release-requires-build:基于建造的权限检查
logging.*:本地日志启用、文件名模式、刷新间隔、队列限制
本地日志
日志默认每天写入一次:
plugins/CaptureSpawn/logs/ball-YYYY-MM-DD.log
日志格式为 TSV(每行一条记录),包含时间戳、玩家、操作、实体类型、世界/坐标、结果等信息。
兼容性
- 依赖项:
- PacketEvents(用于 THROW 模式的基于包触发)
- NBTAPI (Item-NBT-API plugin,用于读取/写入实体 NBT)
CaptureSpawn
A Paper plugin that lets you “capture mobs into a Pokéball” and release them via right-click or a physics-based throw. It preserves entity NBT as much as possible and simulates more realistic projectile behavior (gravity / bounces / rolling / lifetime).
- Runtime: Paper 26.1
- Required dependencies: PacketEvents, NBTAPI (Item-NBT-API plugin)
- License: MIT (LICENSE)
Features
- Capture & release with compressed NBT storage (GZIP + Base64) and necessary sanitization to reduce size risks
- THROW mode: behaves like a real projectile; only captures on collision; can bounce/roll on ground; auto-recovers on timeout
- Pokéball item supports custom player-head texture and configurable name/lore/glow/custom-model-data
- Lore enrichment for common mobs (villager profession/level, sheep color, cat variant, wolf collar/tamed, etc.)
- Protection-friendly: optional “build permission” checks for capture/release to prevent abuse in protected areas
- Persistent local logs with time-range queries (CO-like time filtering)
Quick Start
- Install dependencies: PacketEvents, NBTAPI (Item-NBT-API plugin)
- Put CaptureSpawn into
plugins/ and start the server once to generate config
- Edit
plugins/CaptureSpawn/config.yml
Default interaction mode is THROW (can be switched back to DIRECT in config).
Commands
/capturespawn reload reload config and listeners
/capturespawn log <player|me> <from> [to] [release|capture|all] [limit]
- Time examples:
10m 1h 2d 1w 1h30m
- Examples:
/capturespawn log me 10m all 50
/capturespawn log steve 3d 1d release 100
Permissions
capturespawn.capture capture permission
capturespawn.release release permission
capturespawn.bypass.blacklist bypass capture blacklist
capturespawn.craft craft permission (optional)
capturespawn.reload reload permission (default: OP)
capturespawn.log log query permission (default: OP)
Config Notes
plugins/CaptureSpawn/config.yml (high-level)
interaction-mode: THROW | DIRECT
throw.physics.*: air drag / bounce restitution / friction / max bounces / min-speed threshold
storage.nbt-format: GZIP_BASE64 + storage.max-bytes: control payload size
protection.capture-requires-build / protection.release-requires-build: build-based checks
logging.*: local log enablement, filename pattern, flush interval, queue limit
Local Logs
Logs are written daily by default:
plugins/CaptureSpawn/logs/ball-YYYY-MM-DD.log
The log format is TSV (one record per line) and includes timestamp, player, action, entity type, world/coords, result, etc.
Compatibility
- Dependencies:
- PacketEvents (used for THROW mode packet-based triggering)
- NBTAPI (Item-NBT-API plugin for reading/writing entity NBT)
评论 0
登录后参与评分
还没有评论,来抢沙发吧