NewPlayerPanel v3.1.0
功能特性
村民追踪模块
村民追踪模块提供全面的村民死亡事件监控与记录:
- 死亡事件记录:自动跟踪所有村民死亡事件,并记录完整元数据
- 击杀者识别:记录玩家名称、UUID 及相关信息
- 位置追踪:保存每次事件的精确坐标(X, Y, Z)及世界名称
- 村民类型检测:检测并记录特定类型的村民
- 附魔保留:捕获村民交易中的附魔数据
- 交互式坐标:可点击的坐标,用于瞬间传送至村民死亡地点
- 通知中的可点击传送:村民死亡通知中的坐标可点击,以便快速传送
- 自动维度检测:自动确定正确的维度(主世界/下界/末地),以实现跨世界正确传送
- 高级搜索:支持按玩家名称、坐标或组合条件查询记录
- 通知系统:向具有相应权限的管理员发送实时通知
- 数据清理:根据时间标准自动清理历史记录
玩家限制系统
一套先进的限制系统,允许对玩家行为进行精确控制:
- 多种限制类型:支持 EQUIPMENT(装备)、ITEM(物品)、ENTITY(实体)和 COMMAND(命令)限制
- 默认限制:根据玩家在服务器上的游戏时长自动应用限制
- 时间控制:设置临时或永久限制
- 游戏内管理:通过命令界面创建和修改限制
- 动作粒度:使用动作类型(DAMAGE、USE、DROP、EQUIP、EXECUTE)微调限制
- 个人覆盖:应用覆盖默认设置的单独限制
- 实时执行:每 0.1 秒检查和执行一次限制
- 玩家查看:玩家可使用
/restrictions 查看其当前生效的限制
- 基于时间的默认限制:默认限制的时间从玩家首次加入服务器开始计算,而非从服务器启动开始计算
出生点保护
具有详细配置的灵活出生点保护系统:
- 多个区域:创建无限数量的受保护区域
- 三种区域几何类型:
- CIRCLE — 圆形区域(中心 + 半径,默认)
- RECT — 矩形区域(两个角点,通过
pos1/pos2 设置)
- POLY — 多边形区域(任意数量的顶点,最少 3 个)
- 区域编辑:在游戏内更改半径、中心、世界、PvP/爆炸/火焰设置、移除多边形顶点等
- 管理命令:列出区域、添加和删除区域(带确认提示)、重载配置
- 信息与游戏时长:任何玩家都可以检查模块状态及其游戏时长;管理员可以查看任何玩家的游戏时长
- 方块保护:控制方块的破坏与放置(BLACKLIST/WHITELIST 模式)
- 交互保护:配置允许交互的方块(工作台、铁砧、末影箱等)
- PvP 保护:在受保护区域内禁用 PvP
- 爆炸保护:阻止 TNT、苦力怕、末影水晶和其他爆炸
- 火焰保护:防止火焰蔓延
- 游戏时长绕过:在服务器上经过一定游戏时长后自动解除限制
- 权限绕过:管理员拥有绕过保护的权限
存储系统
多种存储后端,提供最大灵活性:
- YAML/JSON 存储:使用插件数据目录中 JSON 格式的文件存储
- H2 数据库:轻量级嵌入式 SQLite 数据库(默认,无需设置)
- MySQL 支持:完全集成 MySQL 数据库,支持连接池
- MariaDB 支持:原生支持 MariaDB 数据库,优化查询性能
本地化
全面支持国际化:
- 多语言:内置完整的英文和俄文支持
- 可扩展性:通过消息文件轻松添加其他语言
- 自定义消息:所有面向用户的文本均可通过配置文件修改
- 实时语言切换:无需重启服务器即可更改语言
命令
管理命令
| 命令 |
描述 |
权限 |
用法示例 |
/npp reload |
重新加载插件配置并应用更改 |
newplayerpanel.admin |
/npp reload |
/npp addrestriction |
创建新的限制定义 |
newplayerpanel.admin |
/npp addrestriction elytra_ban EQUIPMENT EQUIP minecraft:elytra time:-1 default:false |
命令语法:
/npp addrestriction <name> <type> <actions> [targets...] [time:N] [default:true/false]
历史命令
| 命令 |
描述 |
权限 |
用法示例 |
/history |
显示所有村民死亡记录 |
newplayerpanel.history |
/history |
/history <player> |
显示特定玩家的记录 |
newplayerpanel.history |
/history Steve |
/history <x> <y> <z> |
显示坐标附近的记录 |
newplayerpanel.history |
/history 100 64 200 |
/history coords |
显示你当前位置的记录 |
newplayerpanel.history |
/history coords |
/history purge <time> |
删除指定时间之前的记录 |
newplayerpanel.history.purge |
/history purge 7d |
时间格式示例:
7d - 7 天
30d - 30 天
1h - 1 小时
2w - 2 周
1M - 1 个月
限制管理命令
| 命令 |
说明 |
权限 |
用法示例 |
/restrict <player> <restriction> <time> |
对玩家施加限制 |
newplayerpanel.restrictions.restrict |
/restrict Steve elytra_ban 3600 |
/unrestrict <player> <restriction|all> |
移除玩家的限制(项) |
newplayerpanel.restrictions.restrict |
/unrestrict Steve elytra_ban |
/restrictions |
显示你当前的活跃限制 |
newplayerpanel.restrictions.view |
/restrictions |
/restrictions [player] |
显示某玩家的活跃限制 |
newplayerpanel.restrictions.view.others |
/restrictions Steve |
时间值:
-1 - 永久限制
0 - 移除限制
>0 - 持续时间,单位为秒(例如,3600 = 1 小时)
注意: 玩家可以使用无参数的 /restrictions 查看自己的限制。管理员可以通过指定玩家名称来查看其他玩家的限制。
出生点保护命令
所有人可用(无需特殊权限):
| 命令 |
说明 |
示例 |
/spawnprotect info |
模块信息:启用/禁用状态、区域数量、游戏时长绕过设置 |
/spawnprotect info |
/spawnprotect playtime |
你的游戏时长及(若启用了绕过功能)剩余可绕过时间 |
/spawnprotect playtime |
仅限管理员(newplayerpanel.spawnprotect.admin):
| 命令 |
说明 |
示例 |
/spawnprotect playtime [player] |
任意玩家的游戏时长 |
/spawnprotect playtime Steve |
/spawnprotect list |
列出所有区域及其类型和大小 |
/spawnprotect list |
/spawnprotect add <name> [radius] |
添加圆形区域(确认方式:... add <name> confirm) |
/spawnprotect add spawn 100 |
/spawnprotect add <name> rect |
使用 pos1/pos2 添加矩形区域(确认方式:... add <name> rect confirm) |
/spawnprotect add market rect |
/spawnprotect remove <name> |
移除某个区域(确认方式:... remove <name> confirm) |
/spawnprotect remove spawn |
/spawnprotect pos1 |
记住矩形的第一个角(当前位置) |
/spawnprotect pos1 |
/spawnprotect pos2 |
记住矩形的第二个角(当前位置) |
/spawnprotect pos2 |
/spawnprotect addpoint <name> |
为多边形区域添加顶点(在第一个点时创建区域,后续点则添加) |
/spawnprotect addpoint arena |
/spawnprotect edit <zone> <parameter> <value> |
编辑区域的参数 |
/spawnprotect edit spawn radius 150 |
/spawnprotect reload |
重新加载出生点保护配置 |
/spawnprotect reload |
区域创建:
- 圆形 (CIRCLE):
/spawnprotect add <name> [radius] → ... add <name> confirm
- 矩形 (RECT): 站在第 1 个角 →
/spawnprotect pos1 → 站在第 2 个角 → /spawnprotect pos2 → /spawnprotect add <name> rect → ... add <name> rect confirm
- 多边形 (POLY): 沿着顶点行走,并在每个顶点运行
/spawnprotect addpoint <name>(至少需要 3 个点)
区域编辑 (edit):
| 参数 |
描述 |
示例 |
radius |
区域半径 (CIRCLE) |
/spawnprotect edit spawn radius 200 |
center |
区域中心 = 当前位置 (CIRCLE) |
/spawnprotect edit spawn center |
world |
区域所在世界 = 当前世界 |
/spawnprotect edit spawn world |
pvp |
PvP 保护 |
/spawnprotect edit spawn pvp true |
explosions |
爆炸保护 |
/spawnprotect edit spawn explosions false |
fire-spread |
火焰蔓延保护 |
/spawnprotect edit spawn fire-spread true |
removepoint |
按索引移除多边形顶点 (POLY) |
/spawnprotect edit arena removepoint 2 |
确认操作: 添加和删除区域需要在 30 秒内执行带有 confirm 参数的重复命令。
权限
| 权限节点 |
描述 |
默认访问权限 |
newplayerpanel.admin |
对 /npp 命令的完全管理访问权 |
仅限管理员 (Operators) |
newplayerpanel.history |
查看村民死亡历史记录 |
仅限管理员 (Operators) |
newplayerpanel.history.purge |
清除旧历史记录的权限 |
仅限管理员 (Operators) |
newplayerpanel.notify |
接收关于交易村民死亡的通知 |
仅限管理员 (Operators) |
newplayerpanel.restrictions.bypass |
绕过配置中的所有限制 |
仅限管理员 (Operators) |
newplayerpanel.restrictions.restrict |
应用和移除玩家限制 |
仅限管理员 (Operators) |
newplayerpanel.restrictions.view |
查看自己的活跃限制 |
所有玩家 |
newplayerpanel.restrictions.view.others |
查看其他玩家的限制 |
仅限管理员 (Operators) |
newplayerpanel.spawnprotect.admin |
管理区域(列表、添加、移除、重载),查看任何玩家的游玩时间 |
仅限管理员 (Operators) |
newplayerpanel.spawnprotect.bypass |
绕过出生点保护 |
仅限管理员 (Operators) |
配置
主配置文件 (config.yml)
language: en
storage: H2
database:
host: localhost
port: 3306
database: newplayerpanel
username: root
password: ""
pool:
maximum-pool-size: 10
minimum-idle: 2
connection-timeout: 30000
idle-timeout: 600000
max-lifetime: 1800000
villager-tracker:
only-traded: true
notify-enabled: true
save-debug-files: false
spawn-protect:
enabled: true
出生点保护配置 (spawnprotect.yml)
支持三种区域类型:CIRCLE(默认)、RECT、POLY。
# 游玩时间豁免(以秒为单位,0 = 禁用)
bypass-after-playtime: 0
# 区域类型:
# CIRCLE — 中心点 + 半径
# RECT — 矩形(最小/最大角点)
# POLY — 多边形(顶点列表,至少 3 个)
zones:
# --- 圆形区域 ---
spawn:
world: world
type: CIRCLE
center:
x: 0
z: 0
radius: 100
block-break:
enabled: true
mode: WHITELIST
list: []
block-place:
enabled: true
mode: WHITELIST
list: []
interact:
enabled: true
mode: WHITELIST
list:
- ENDER_CHEST
- CRAFTING_TABLE
- ENCHANTING_TABLE
- ANVIL
- SMITHING_TABLE
- GRINDSTONE
- STONECUTTER
entity-interact:
enabled: false
mode: WHITELIST
list:
- VILLAGER
- WANDERING_TRADER
pvp:
enabled: true
explosions:
enabled: true
fire-spread:
enabled: true
# --- Rectangular Zone ---
# z1:
# type: RECT
# min:
# x: -50
# z: -30
# max:
# x: 50
# z: 30
# --- Polygonal Zone ---
# z2:
# type: POLY
# points:
# - {x: 100, z: 100}
# - {x: 200, z: 100}
# - {x: 250, z: 200}
# - {x: 150, z: 250}
# - {x: 50, z: 200}
限制配置文件 (restrictions.yml)
restrictions:
- name: elytra_ban
type: EQUIPMENT
actions: EQUIP
item: [minecraft:elytra]
time: -1
default: false
- name: tnt_restriction
type: ITEM
actions: USE
item: [minecraft:tnt]
time: 28800
default: true
- name: villager_hit_restriction
type: ENTITY
actions: DAMAGE
entity: [minecraft:villager]
time: -1
default: false
限制类型
| 类型 |
描述 |
目标字段 |
EQUIPMENT |
限制在盔甲/鞘翅槽位中装备物品 |
item |
ITEM |
限制使用或放置物品 |
item |
ENTITY |
限制与实体的交互 |
entity |
COMMAND |
限制执行命令 |
command |
动作类型
| 动作 |
描述 |
DAMAGE |
对实体造成伤害 |
USE |
使用或放置物品 |
DROP |
丢弃物品 |
EQUIP |
在盔甲/鞘翅槽位中装备物品 |
EXECUTE |
执行命令 |
限制逻辑
默认限制:
- 当
default: true 时,限制将自动应用于所有玩家
- 时间从玩家首次加入服务器开始计算(而非从服务器启动开始)
- 示例:如果
time: 3600(1小时),则该限制将在玩家首次加入后的第一小时内生效
- 如果
time: -1,则该限制对所有玩家永久有效
- 默认限制会在时间过期后自动移除
个人限制:
- 通过
/restrict 命令应用
- 时间从应用时刻开始计算(而非从首次加入开始)
- 个人限制覆盖默认限制
- 如果玩家存在个人限制,则名称相同的默认限制将被忽略
- 个人限制可以使用
/unrestrict 手动移除
优先级顺序:
- 个人限制(最高优先级)
- 默认限制(若无个人限制则生效)
查看限制:
- 玩家可以查看自己的限制:
/restrictions
- 管理员可以查看任何玩家的限制:
/restrictions <player>
- 个人限制和默认限制都会显示剩余时间
存储系统
YAML/JSON 存储
基于文件的 JSON 格式存储。所有数据存储在 plugins/NewPlayerPanel/data/ 目录下:
messages.json - 本地化消息
villager_deaths.json - 村民死亡记录
restrictions.json - 玩家限制数据
优点:
- 无需设置数据库
- 易于备份(只需复制文件)
- 可读性强
配置:
storage: YAML
H2 数据库(默认)
嵌入式 SQLite 数据库,存储为 plugins/NewPlayerPanel/database.db。
优点:
- 无外部依赖
- 自动设置
- 适用于中小型服务器,性能良好
配置:
storage: H2
MySQL 数据库
通过 HikariCP 连接池完全集成 MySQL 数据库。
优点:
- 可扩展以支持大型服务器
- 支持多服务器实例
- 支持高级查询功能
配置:
storage: MYSQL
database:
host: localhost
port: 3306
database: newplayerpanel
username: root
password: your_password
MariaDB 数据库
原生支持 MariaDB 并优化了连接处理。
优点:
- 兼容 MariaDB 特性
- 高性能
- 企业级可靠性
- 带有适当参数的优化连接
- 自动进行向后兼容的架构验证
配置:
storage: MARIADB
database:
host: localhost
port: 3306
database: newplayerpanel
username: root
password: your_password
pool:
maximum-pool-size: 10
minimum-idle: 2
connection-timeout: 30000
idle-timeout: 600000
max-lifetime: 1800000
兼容性
支持的服务器软件
- Spigot - 完全兼容
- Purpur - 完全兼容
- 任何基于 Bukkit 的服务器 - 兼容标准 Bukkit API
Minecraft 版本
- 1.21.x - 完全支持
- 未来版本 - 应能与 1.20+ API 配合使用
Java 要求
- Java 17 - 最低要求版本
- Java 21 - 推荐用于最佳性能
数据库要求(如果使用 MySQL/MariaDB)
- MySQL 8.0+
- MariaDB 10.3+
- 数据库必须支持 UTF-8 编码
支持与文档
- 作者: Math_Tereegor (ava ex666)
- 帮助与支持: MISQZY 和 6oJIeH
- 插件版本: 3.1.0
NewPlayerPanel v3.1.0
Features
Villager Tracker Module
The Villager Tracker module provides comprehensive monitoring and logging of villager death events:
- Death Event Recording: Automatically tracks all villager deaths with full metadata
- Killer Identification: Records player name, UUID, and related information
- Location Tracking: Saves exact coordinates (X, Y, Z) and world name for each event
- Villager Type Detection: Detects and logs the specific type of villager
- Enchantment Preservation: Captures enchantment data from villager trades
- Interactive Coordinates: Clickable coordinates for instant teleportation to the villager death location
- Clickable Teleport in Notifications: Coordinates in villager death notifications are clickable for quick teleportation
- Automatic Dimension Detection: Automatically determines the correct dimension (overworld/nether/end) for proper cross-world teleportation
- Advanced Search: Query records by player name, coordinates, or combined criteria
- Notification System: Real-time notifications for administrators with appropriate permissions
- Data Purging: Automatic cleanup of historical records based on time criteria
Player Restrictions System
An advanced restrictions system allowing precise control over player actions:
- Multiple Restriction Types: Support for EQUIPMENT, ITEM, ENTITY, and COMMAND restrictions
- Default Restrictions: Automatically apply restrictions based on a player's playtime on the server
- Time Control: Set temporary or permanent restrictions
- In-Game Management: Create and modify restrictions via a command interface
- Action Granularity: Fine-tune restrictions using action types (DAMAGE, USE, DROP, EQUIP, EXECUTE)
- Personal Overrides: Apply individual restrictions that override default settings
- Real-Time Enforcement: Restrictions are checked and enforced every 0.1 seconds
- Player Viewing: Players can view their active restrictions using
/restrictions
- Time-based Default Restrictions: Default restrictions count time from the player's first join, not from server startup
Spawn Protection
Flexible spawn protection system with detailed configuration:
- Multiple Zones: Create an unlimited number of protected zones
- Three Zone Geometry Types:
- CIRCLE — circular zone (center + radius, default)
- RECT — rectangular zone (two corners, set via
pos1/pos2)
- POLY — polygonal zone (arbitrary number of vertices, minimum 3)
- Zone Editing: Change radius, center, world, PvP/explosions/fire, remove polygon vertices — all in-game
- Management Commands: List zones, add and remove zones (with confirmation), reload config
- Info and Playtime: Any player can check the module status and their playtime; admins can check any player's playtime
- Block Protection: Control block breaking and placing (BLACKLIST/WHITELIST modes)
- Interaction Protection: Configure allowed blocks for interaction (crafting tables, anvils, ender chests, etc.)
- PvP Protection: Disable PvP in protected zones
- Explosion Protection: Block TNT, creepers, end crystals, and other explosions
- Fire Protection: Prevent fire spread
- Playtime Bypass: Automatically lift restrictions after a certain amount of playtime on the server
- Permission Bypass: Ability to bypass protection for administrators
Storage Systems
Multiple storage backends for maximum flexibility:
- YAML/JSON Storage: File-based storage using JSON format in the plugin data directory
- H2 Database: Lightweight embedded SQLite database (default, requires no setup)
- MySQL Support: Full integration with MySQL database with connection pooling
- MariaDB Support: Native support for MariaDB database with optimized queries
Localization
Full support for internationalization:
- Multilingual: Full support for English and Russian languages included
- Extensibility: Easily add additional languages via message files
- Customizable Messages: All user-facing text can be modified via configuration
- Real-Time Language Switching: Change language without restarting the server
Commands
Administrative Commands
| Command |
Description |
Permission |
Usage Example |
/npp reload |
Reloads the plugin configuration and applies changes |
newplayerpanel.admin |
/npp reload |
/npp addrestriction |
Creates a new restriction definition |
newplayerpanel.admin |
/npp addrestriction elytra_ban EQUIPMENT EQUIP minecraft:elytra time:-1 default:false |
Command Syntax:
/npp addrestriction <name> <type> <actions> [targets...] [time:N] [default:true/false]
History Commands
| Command |
Description |
Permission |
Usage Example |
/history |
Displays all villager death records |
newplayerpanel.history |
/history |
/history <player> |
Shows records for a specific player |
newplayerpanel.history |
/history Steve |
/history <x> <y> <z> |
Shows records near coordinates |
newplayerpanel.history |
/history 100 64 200 |
/history coords |
Shows records at your current location |
newplayerpanel.history |
/history coords |
/history purge <time> |
Deletes records older than the specified time |
newplayerpanel.history.purge |
/history purge 7d |
Time Format Examples:
7d - 7 days
30d - 30 days
1h - 1 hour
2w - 2 weeks
1M - 1 month
Restrictions Management Commands
| Command |
Description |
Permission |
Usage Example |
/restrict <player> <restriction> <time> |
Applies a restriction to a player |
newplayerpanel.restrictions.restrict |
/restrict Steve elytra_ban 3600 |
/unrestrict <player> <restriction|all> |
Removes restriction(s) from a player |
newplayerpanel.restrictions.restrict |
/unrestrict Steve elytra_ban |
/restrictions |
Displays your active restrictions |
newplayerpanel.restrictions.view |
/restrictions |
/restrictions [player] |
Displays a player's active restrictions |
newplayerpanel.restrictions.view.others |
/restrictions Steve |
Time Values:
-1 - Permanent restriction
0 - Remove restriction
>0 - Duration in seconds (e.g., 3600 = 1 hour)
Note: Players can view their restrictions using /restrictions with no arguments. Administrators can view other players' restrictions by specifying the player name.
Spawn Protection Commands
Available to everyone (no special permission required):
| Command |
Description |
Example |
/spawnprotect info |
Module info: enabled/disabled, zone count, playtime bypass setting |
/spawnprotect info |
/spawnprotect playtime |
Your playtime and (if bypass is enabled) remaining time until bypass |
/spawnprotect playtime |
Administrators only (newplayerpanel.spawnprotect.admin):
| Command |
Description |
Example |
/spawnprotect playtime [player] |
Any player's playtime |
/spawnprotect playtime Steve |
/spawnprotect list |
List of zones with type and size |
/spawnprotect list |
/spawnprotect add <name> [radius] |
Add a circular zone (confirmation: ... add <name> confirm) |
/spawnprotect add spawn 100 |
/spawnprotect add <name> rect |
Add a rectangular zone using pos1/pos2 (confirmation: ... add <name> rect confirm) |
/spawnprotect add market rect |
/spawnprotect remove <name> |
Remove a zone (confirmation: ... remove <name> confirm) |
/spawnprotect remove spawn |
/spawnprotect pos1 |
Remember the 1st corner of a rectangle (current position) |
/spawnprotect pos1 |
/spawnprotect pos2 |
Remember the 2nd corner of a rectangle (current position) |
/spawnprotect pos2 |
/spawnprotect addpoint <name> |
Add a vertex to a polygonal zone (creates the zone on the first point, then adds) |
/spawnprotect addpoint arena |
/spawnprotect edit <zone> <parameter> <value> |
Edit a zone parameter |
/spawnprotect edit spawn radius 150 |
/spawnprotect reload |
Reload spawn protection configuration |
/spawnprotect reload |
Zone Creation:
- Circular (CIRCLE):
/spawnprotect add <name> [radius] → ... add <name> confirm
- Rectangular (RECT): stand in 1st corner →
/spawnprotect pos1 → stand in 2nd corner → /spawnprotect pos2 → /spawnprotect add <name> rect → ... add <name> rect confirm
- Polygonal (POLY): walk around the vertices and run
/spawnprotect addpoint <name> at each one (minimum 3 points)
Zone Editing (edit):
| Parameter |
Description |
Example |
radius |
Zone radius (CIRCLE) |
/spawnprotect edit spawn radius 200 |
center |
Zone center = current position (CIRCLE) |
/spawnprotect edit spawn center |
world |
Zone world = current world |
/spawnprotect edit spawn world |
pvp |
PvP protection |
/spawnprotect edit spawn pvp true |
explosions |
Explosion protection |
/spawnprotect edit spawn explosions false |
fire-spread |
Fire protection |
/spawnprotect edit spawn fire-spread true |
removepoint |
Remove a polygon vertex by index (POLY) |
/spawnprotect edit arena removepoint 2 |
Confirmation: Adding and removing zones requires a repeated command with the confirm argument within 30 seconds.
Permissions
| Permission Node |
Description |
Default Access |
newplayerpanel.admin |
Full administrative access to /npp commands |
Operators only |
newplayerpanel.history |
View villager death history records |
Operators only |
newplayerpanel.history.purge |
Permission to purge old history records |
Operators only |
newplayerpanel.notify |
Receive notifications about traded villager deaths |
Operators only |
newplayerpanel.restrictions.bypass |
Bypass all restrictions from configuration |
Operators only |
newplayerpanel.restrictions.restrict |
Apply and remove player restrictions |
Operators only |
newplayerpanel.restrictions.view |
View your own active restrictions |
All players |
newplayerpanel.restrictions.view.others |
View other players' restrictions |
Operators only |
newplayerpanel.spawnprotect.admin |
Manage zones (list, add, remove, reload), view any player's playtime |
Operators only |
newplayerpanel.spawnprotect.bypass |
Bypass spawn protection |
Operators only |
Configuration
Main Configuration File (config.yml)
language: en
storage: H2
database:
host: localhost
port: 3306
database: newplayerpanel
username: root
password: ""
pool:
maximum-pool-size: 10
minimum-idle: 2
connection-timeout: 30000
idle-timeout: 600000
max-lifetime: 1800000
villager-tracker:
only-traded: true
notify-enabled: true
save-debug-files: false
spawn-protect:
enabled: true
Spawn Protection Configuration (spawnprotect.yml)
Three zone types are supported: CIRCLE (default), RECT, POLY.
# Playtime bypass (in seconds, 0 = disabled)
bypass-after-playtime: 0
# Zone types:
# CIRCLE — center + radius
# RECT — rectangle (min/max corners)
# POLY — polygon (list of vertices, min 3)
zones:
# --- Circular Zone ---
spawn:
world: world
type: CIRCLE
center:
x: 0
z: 0
radius: 100
block-break:
enabled: true
mode: WHITELIST
list: []
block-place:
enabled: true
mode: WHITELIST
list: []
interact:
enabled: true
mode: WHITELIST
list:
- ENDER_CHEST
- CRAFTING_TABLE
- ENCHANTING_TABLE
- ANVIL
- SMITHING_TABLE
- GRINDSTONE
- STONECUTTER
entity-interact:
enabled: false
mode: WHITELIST
list:
- VILLAGER
- WANDERING_TRADER
pvp:
enabled: true
explosions:
enabled: true
fire-spread:
enabled: true
# --- Rectangular Zone ---
# z1:
# type: RECT
# min:
# x: -50
# z: -30
# max:
# x: 50
# z: 30
# --- Polygonal Zone ---
# z2:
# type: POLY
# points:
# - {x: 100, z: 100}
# - {x: 200, z: 100}
# - {x: 250, z: 200}
# - {x: 150, z: 250}
# - {x: 50, z: 200}
Restrictions Configuration File (restrictions.yml)
restrictions:
- name: elytra_ban
type: EQUIPMENT
actions: EQUIP
item: [minecraft:elytra]
time: -1
default: false
- name: tnt_restriction
type: ITEM
actions: USE
item: [minecraft:tnt]
time: 28800
default: true
- name: villager_hit_restriction
type: ENTITY
actions: DAMAGE
entity: [minecraft:villager]
time: -1
default: false
Restriction Types
| Type |
Description |
Target Field |
EQUIPMENT |
Restricts equipping items in armor/elytra slots |
item |
ITEM |
Restricts using or placing items |
item |
ENTITY |
Restricts interaction with entities |
entity |
COMMAND |
Restricts executing commands |
command |
Action Types
| Action |
Description |
DAMAGE |
Dealing damage to entities |
USE |
Using or placing items |
DROP |
Dropping items |
EQUIP |
Equipping items in armor/elytra slots |
EXECUTE |
Executing commands |
Restriction Logic
Default Restrictions:
- When
default: true, restrictions are automatically applied to all players
- Time is calculated from the player's first join (not from server startup)
- Example: If
time: 3600 (1 hour), the restriction is applied during the first hour after the player's first join
- If
time: -1, the restriction is permanent for all players
- Default restrictions are automatically removed when the time expires
Personal Restrictions:
- Applied via the
/restrict command
- Time is calculated from the moment of application (not from first join)
- Personal restrictions override default restrictions
- If a player has a personal restriction, default restrictions with the same name are ignored
- Personal restrictions can be manually removed using
/unrestrict
Priority Order:
- Personal restrictions (highest priority)
- Default restrictions (if no personal restriction exists)
Viewing Restrictions:
- Players can view their own restrictions:
/restrictions
- Administrators can view any player's restrictions:
/restrictions <player>
- Both personal and default restrictions are displayed with remaining time
Storage Systems
YAML/JSON Storage
File-based storage using JSON format. All data is stored in plugins/NewPlayerPanel/data/:
messages.json - Localization messages
villager_deaths.json - Villager death records
restrictions.json - Player restriction data
Advantages:
- No database setup required
- Easy to backup (just copy files)
- Readable format
Configuration:
storage: YAML
H2 Database (Default)
Embedded SQLite database, stored as plugins/NewPlayerPanel/database.db.
Advantages:
- No external dependencies
- Automatic setup
- Good performance for small to medium servers
Configuration:
storage: H2
MySQL Database
Full integration with MySQL database with connection pooling via HikariCP.
Advantages:
- Scalable for large servers
- Supports multiple server instances
- Advanced querying capabilities
Configuration:
storage: MYSQL
database:
host: localhost
port: 3306
database: newplayerpanel
username: root
password: your_password
MariaDB Database
Native support for MariaDB with optimized connection handling.
Advantages:
- Compatibility with MariaDB features
- High performance
- Enterprise-grade reliability
- Optimized connection with proper parameters
- Automatic schema validation for backwards compatibility
Configuration:
storage: MARIADB
database:
host: localhost
port: 3306
database: newplayerpanel
username: root
password: your_password
pool:
maximum-pool-size: 10
minimum-idle: 2
connection-timeout: 30000
idle-timeout: 600000
max-lifetime: 1800000
Compatibility
Supported Server Software
- Spigot - Full compatibility
- Purpur - Full compatibility
- Any Bukkit-based server - Compatible with standard Bukkit API
Minecraft Versions
- 1.21.x - Fully supported
- Future versions - Should work with 1.20+ API
Java Requirements
- Java 17 - Minimum required version
- Java 21 - Recommended for optimal performance
Database Requirements (if using MySQL/MariaDB)
- MySQL 8.0+
- MariaDB 10.3+
- Database must support UTF-8 encoding
Support and Documentation
- Author: Math_Tereegor (ava ex666)
- Help and Support: MISQZY and 6oJIeH
- Plugin Version: 3.1.0
评论 0
登录后参与评分
还没有评论,来抢沙发吧