PlayerNotes 是一款适用于 Minecraft 服务器的简易员工工具,允许管理员记录并查看玩家备注。备注有助于员工在玩家离线时也能追踪警告、行为表现及背景信息。该插件包含添加、列出、查看、移除和清除备注的命令,并提供完整的权限控制。它支持用于小型服务器的扁平文件存储以及用于大型架构的 MySQL 存储。消息可自定义,支持 MiniMessage 格式,PlaceholderAPI 可在聊天或菜单中显示备注信息。所有操作均异步运行以保持服务器流畅,界面简洁明了,方便员工使用而不会产生困惑。

命令
剧透
主命令:
/note
别名: /notes, /pnote, /playernotes
子命令
/note add <player> <note>
为玩家添加备注
/note remove <player> <id>
根据 ID 移除备注
/note clear <player>
清除玩家的所有备注
/note list <player> [page]
显示玩家的备注列表
/note info <player> <id>
显示单条备注的完整信息
权限
剧透
| 权限 |
功能 |
默认值 |
playernotes.add |
添加备注 |
op |
playernotes.remove |
移除备注 |
op |
playernotes.clear |
清除备注 |
op |
playernotes.list |
查看备注 |
op |
playernotes.info |
查看备注详情 |
op |
playernotes.reload |
重载配置 |
op |
PlaceholderAPI
剧透
软依赖
占位符
| 占位符 |
含义 |
%playernotes_count% |
玩家的备注总数 |
%playernotes_has_notes% |
true 或 false |
%playernotes_latest_text% |
最新备注的内容 |
%playernotes_latest_actor% |
撰写最新备注的人 |
%playernotes_latest_date% |
添加最新备注的时间 |
%playernotes_latest_id% |
最新备注的 ID |
%playernotes_oldest_text% |
最早备注的内容 |
%playernotes_oldest_actor% |
撰写最早备注的人 |
%playernotes_oldest_date% |
添加最早备注的时间 |
%playernotes_note_<id>_text% |
指定 ID 备注的内容 |
%playernotes_note_<id>_actor% |
该备注的撰写者 |
消息系统
剧透
MiniMessage 支持
- 颜色(名称和十六进制)
- 渐变
- 彩虹文本
- 粗体、斜体、下划线、删除线、乱码
- 悬停和点击事件
消息占位符
| 占位符 |
含义 |
{prefix} |
插件前缀 |
{player} |
目标玩家 |
{actor} |
员工名称 |
{note} |
备注内容 |
{id} |
备注 ID |
{timestamp} |
备注生成时间 |
{page} |
页码 |
{total_pages} |
总页数 |
{count} |
备注总数 |
{notes} |
格式化后的备注列表 |
存储选项
剧透
扁平文件
- YAML 格式
- 每个 UUID 一个文件夹
- 适合小型服务器
MySQL
文件
剧透
config.yml
剧透
# PlayerNotes 配置
# 存储配置
storage:
# 存储类型:"mysql" 或 "flatfile"
type: flatfile
# MySQL 设置(仅在类型为 mysql 时使用)
mysql:
host: localhost
port: 3306
database: minecraft
username: root
password: password
# 可选的连接参数
params: "?useSSL=false&autoReconnect=true"
# 扁平文件设置(仅在类型为 flatfile 时使用)
flatfile:
# 插件数据文件夹下的文件夹名称
folder: playerdata
# 显示设置
display:
# /note list 命令每页显示的备注数量
page-size: 10
# 显示时间戳的日期格式
# 可用格式:ISO (2024-01-15T14:30:00), LOCAL (01/15/2024 02:30 PM), SIMPLE (2024-01-15 14:30)
date-format: SIMPLE
# 验证设置
validation:
# 备注内容的最大长度
max-text-length: 512
# 从备注内容中去除颜色代码
strip-colors: true
# 性能设置
performance:
# 启用最近备注列表的简单缓存
enable-cache: true
# 缓存生存时间(秒)
cache-ttl: 60
# 要缓存的最大玩家数量
cache-size: 50
messages.yml
剧透
# PlayerNotes 消息配置
# 所有消息均支持 MiniMessage 格式:https://docs.advntr.dev/minimessage/format.html
# 占位符:
# {player} - 目标玩家名称
# {uuid} - 目标玩家 UUID
# {actor} - 执行操作的人
# {id} - 备注 ID
# {count} - 备注数量
# {page} - 当前页码
# {total_pages} - 总页数
# {timestamp} - 格式化后的时间戳
# {text} - 备注内容
# {max_length} - 最大文本长度
# 通用消息
no-permission: "<red>You don't have permission to use this command."
player-not-found: "<red>Player '<yellow>{player}</yellow>' not found."
player-never-joined: "<red>Player '<yellow>{player}</yellow>' has never joined this server."
invalid-number: "<red>Invalid number provided."
storage-error: "<red>Failed to perform operation. Please try again later."
# 添加命令消息
add:
usage: "<red>用法:/note add <玩家> <文本>"
text-empty: "<red>笔记文本不能为空。"
text-too-long: "<red>笔记文本过长。最大长度为 <yellow>{max_length}</yellow> 个字符。"
success: "<green>已为 <yellow>{玩家}</yellow> 添加笔记。"
# 列表命令消息
list:
usage: "<red>用法:/note list <玩家> [页码]"
invalid-page: "<red>无效的页码。"
no-self-permission: "<red>你没有权限查看自己的笔记。"
empty: "<yellow>{player}</yellow> <gray>没有笔记。"
header: "<gold><bold>=== {player} 的笔记 ==="
uuid-line: "<gray>UUID: <white>{uuid}"
total-line: "<gray>总记录数: <white>{count} <gray>| <gray>页码: <white>{page}/{total_pages}"
entry: "<yellow>[#{id}] <gray>{timestamp} <white>{actor}<gray>: <white>{text}"
next-page: "<gray>使用 <yellow>/note list {player} {page}</yellow> <gray>查看下一页。"
# 移除命令消息
remove:
usage: "<red>用法: /note remove <player> <id>"
invalid-id: "<red>无效的笔记 ID。"
success: "<green>已从 <yellow>{player}</yellow> 删除笔记 <yellow>#{id}</yellow>。"
not-found: "<red><yellow>{player}</yellow> 不存在笔记 <yellow>#{id}</yellow>。"
# 清除命令消息
clear:
usage: "<red>用法:/note clear <player> confirm"
confirm-prompt: "<red>确定要清除 <yellow>{player}</yellow> 的所有笔记吗?"
confirm-instruction: "<red>请使用 <yellow>/note clear {player} confirm</yellow> 继续操作。"
success: "<green>已清除来自 <yellow>{player}</yellow> 的 <yellow>{count}</yellow> 条笔记。"
empty: "<yellow>{player}</yellow> <gray>没有需要清除的笔记。"
# Info command messages
info:
usage: "<red>用法:/note info <player>"
no-self-permission: "<red>您无权查看自己的笔记。"
header: "<gold><bold>=== {player} 的笔记信息 ==="
uuid-line: "<gray>UUID: <white>{uuid}"
total-line: "<gray>笔记总数: <white>{count}"
latest-header: "<gray>最新笔记:"
latest-entry: "<yellow>[#{id}] <gray>{timestamp} <white>{actor}<gray>: <white>{text}"
view-all: "<gray>请使用 <yellow>/note list {player}</yellow> 查看所有笔记。"
# Reload command messages
reload-success: "<green>插件配置和消息已成功重载!"
# 帮助命令消息
help:
header: "<gold><bold>=== PlayerNotes 命令 ==="
entry: "<yellow>/note {用法} <gray>- <white>{描述}"
unknown-subcommand: "<red>未知子命令。请使用 <yellow>/note</yellow> 查看命令列表。"
PlayerNotes is a simple staff tool for Minecraft servers that lets moderators record and check notes on players. Notes help staff keep track of warnings, behavior, and context over time, even when players are offline. The plugin includes commands to add, list, view, remove, and clear notes, along with full permission control. It supports both flat file storage for small servers and MySQL for bigger setups. Messages can be customized, MiniMessage formatting is supported, and PlaceholderAPI can show note info in chat or menus. Everything runs async to keep the server smooth, and the layout is clean so staff can use it without confusion.

Commands
Spoiler
Main Command:
/note
Aliases: /notes, /pnote, /playernotes
Subcommands
/note add <player> <note>
Add a note to a player
/note remove <player> <id>
Remove a note by ID
/note clear <player>
Clear all notes for a player
/note list <player> [page]
Show notes for a player
/note info <player> <id>
Show full info for one note
Permissions
Spoiler
| Permission |
What it does |
Default |
playernotes.add |
Add notes |
op |
playernotes.remove |
Remove notes |
op |
playernotes.clear |
Clear notes |
op |
playernotes.list |
View notes |
op |
playernotes.info |
View note info |
op |
playernotes.reload |
Reload config |
op |
PlaceholderAPI
Spoiler
Soft dependency
Placeholders
| Placeholder |
Meaning |
%playernotes_count% |
Total notes for player |
%playernotes_has_notes% |
true or false |
%playernotes_latest_text% |
Latest note text |
%playernotes_latest_actor% |
Who wrote latest note |
%playernotes_latest_date% |
When latest note was added |
%playernotes_latest_id% |
Latest note ID |
%playernotes_oldest_text% |
Oldest note text |
%playernotes_oldest_actor% |
Who wrote oldest note |
%playernotes_oldest_date% |
When oldest note was added |
%playernotes_note_<id>_text% |
Text of a note by ID |
%playernotes_note_<id>_actor% |
Actor of that note |
Message System
Spoiler
MiniMessage Support
- Colors (names and hex)
- Gradients
- Rainbow text
- Bold, italic, underline, strike, obfuscated
- Hover and click events
Message placeholders
| Placeholder |
Meaning |
{prefix} |
Plugin prefix |
{player} |
Target player |
{actor} |
Staff name |
{note} |
Note text |
{id} |
Note ID |
{timestamp} |
When note was made |
{page} |
Page number |
{total_pages} |
Number of pages |
{count} |
Total notes |
{notes} |
Formatted notes list |
Storage Options
Spoiler
Flat File
- YAML
- Folder per UUID
- Good for small servers
MySQL
- Works across network
- Uses HikariCP
- Async
Files
Spoiler
config.yml
Spoiler
# PlayerNotes Configuration
# Storage configuration
storage:
# Type of storage: "mysql" or "flatfile"
type: flatfile
# MySQL settings (only used if type is mysql)
mysql:
host: localhost
port: 3306
database: minecraft
username: root
password: password
# Optional connection parameters
params: "?useSSL=false&autoReconnect=true"
# Flat file settings (only used if type is flatfile)
flatfile:
# Folder name under the plugin data folder
folder: playerdata
# Display settings
display:
# Number of notes per page in /note list
page-size: 10
# Date format for displaying timestamps
# Available formats: ISO (2024-01-15T14:30:00), LOCAL (01/15/2024 02:30 PM), SIMPLE (2024-01-15 14:30)
date-format: SIMPLE
# Validation settings
validation:
# Maximum length for note text
max-text-length: 512
# Strip color codes from note text
strip-colors: true
# Performance settings
performance:
# Enable simple caching for recent note lists
enable-cache: true
# Cache time-to-live in seconds
cache-ttl: 60
# Maximum number of players to cache
cache-size: 50
messages.yml
Spoiler
# PlayerNotes Messages Configuration
# All messages support MiniMessage formatting: https://docs.advntr.dev/minimessage/format.html
# Placeholders:
# {player} - Target player name
# {uuid} - Target player UUID
# {actor} - The person executing the action
# {id} - Note ID
# {count} - Number of notes
# {page} - Current page number
# {total_pages} - Total number of pages
# {timestamp} - Formatted timestamp
# {text} - Note text
# {max_length} - Maximum text length
# General messages
no-permission: "<red>You don't have permission to use this command."
player-not-found: "<red>Player '<yellow>{player}</yellow>' not found."
player-never-joined: "<red>Player '<yellow>{player}</yellow>' has never joined this server."
invalid-number: "<red>Invalid number provided."
storage-error: "<red>Failed to perform operation. Please try again later."
# Add command messages
add:
usage: "<red>Usage: /note add <player> <text>"
text-empty: "<red>Note text cannot be empty."
text-too-long: "<red>Note text is too long. Maximum length is <yellow>{max_length}</yellow> characters."
success: "<green>Note added to <yellow>{player}</yellow>."
# List command messages
list:
usage: "<red>Usage: /note list <player> [page]"
invalid-page: "<red>Invalid page number."
no-self-permission: "<red>You don't have permission to view your own notes."
empty: "<yellow>{player}</yellow> <gray>has no notes."
header: "<gold><bold>=== Notes for {player} ==="
uuid-line: "<gray>UUID: <white>{uuid}"
total-line: "<gray>Total Notes: <white>{count} <gray>| <gray>Page: <white>{page}/{total_pages}"
entry: "<yellow>[#{id}] <gray>{timestamp} <white>{actor}<gray>: <white>{text}"
next-page: "<gray>Use <yellow>/note list {player} {page}</yellow> <gray>for the next page."
# Remove command messages
remove:
usage: "<red>Usage: /note remove <player> <id>"
invalid-id: "<red>Invalid note ID."
success: "<green>Note <yellow>#{id}</yellow> removed from <yellow>{player}</yellow>."
not-found: "<red>Note <yellow>#{id}</yellow> does not exist for <yellow>{player}</yellow>."
# Clear command messages
clear:
usage: "<red>Usage: /note clear <player> confirm"
confirm-prompt: "<red>Are you sure you want to clear all notes for <yellow>{player}</yellow>?"
confirm-instruction: "<red>Use <yellow>/note clear {player} confirm</yellow> to proceed."
success: "<green>Cleared <yellow>{count}</yellow> note(s) from <yellow>{player}</yellow>."
empty: "<yellow>{player}</yellow> <gray>has no notes to clear."
# Info command messages
info:
usage: "<red>Usage: /note info <player>"
no-self-permission: "<red>You don't have permission to view your own notes."
header: "<gold><bold>=== Note Info for {player} ==="
uuid-line: "<gray>UUID: <white>{uuid}"
total-line: "<gray>Total Notes: <white>{count}"
latest-header: "<gray>Latest Note:"
latest-entry: "<yellow>[#{id}] <gray>{timestamp} <white>{actor}<gray>: <white>{text}"
view-all: "<gray>Use <yellow>/note list {player}</yellow> to view all notes."
# Reload command messages
reload-success: "<green>Plugin configuration and messages reloaded successfully!"
# Help command messages
help:
header: "<gold><bold>=== PlayerNotes Commands ==="
entry: "<yellow>/note {usage} <gray>- <white>{description}"
unknown-subcommand: "<red>Unknown subcommand. Use <yellow>/note</yellow> for a list of commands."
评论 0
登录后参与评分
还没有评论,来抢沙发吧