JLLogger
JLLogger 是一款基于 Paper 1.21.4、使用 Kotlin 编写的插件,用于记录玩家加入和离开服务器的事件。它提供了易于使用的命令来查询会话历史和玩家统计数据。
功能
- 加入/离开日志记录:自动将每次加入和离开事件记录到本地 SQLite 数据库中。
- 在线时长追踪:计算并存储玩家在服务器上的总停留时间。
- 基于时间的历史记录:支持查询特定时间段内的日志(例如过去 1 小时、30 分钟)。
- 国际化 (i18n):支持多种语言(默认:日语和英语)。
- Tab 补全:提供智能的命令建议,提升用户体验。
命令
/jl show <time>:显示指定时间段内的加入/离开记录。
- 示例:
/jl show 1h、/jl show 30m、/jl show 1d
/jl player <player>:显示特定玩家的加入/离开历史、总停留时长以及最后登录时间。
/jl reload:重新加载配置文件和消息文件。
权限
jllogger.use:允许使用 /jl show 和 /jl player 命令。(默认:OP)
jllogger.admin:允许使用 /jl reload 命令。(默认:OP)
配置
你可以在 config.yml 中更改插件的语言:
# Language: ja (Japanese), en (English)
language: en
消息分别存储在 messages_ja.yml 和 messages_en.yml 中。
版本
该插件采用基于日期的版本号方案(例如 1.26.02.06.1)。
构建
要从源代码构建插件,请确保已安装 Maven 和 JDK 21:
mvn clean package
生成的 JAR 文件将位于 target/ 目录中。
源码
GitHub
JLLogger
JLLogger is a Paper 1.21.4 plugin written in Kotlin that records player Join and Leave events. It provides easy-to-use commands to query session history and player statistics.
Features
- Join/Leave Logging: Automatically records every join and leave event in a local SQLite database.
- Session Duration Tracking: Calculates and stores the total time players spend on the server.
- Time-based History: Query logs within a specific timeframe (e.g., last 1 hour, 30 minutes).
- Internationalization (i18n): Supports multiple languages (Default: Japanese and English).
- Tab Completion: Intelligent command suggestions for a better user experience.
Commands
/jl show <time>: Displays join/leave records within the specified time period.
- Examples:
/jl show 1h, /jl show 30m, /jl show 1d
/jl player <player>: Displays the join/leave history, total stay duration, and last login of a specific player.
/jl reload: Reloads the configuration and message files.
Permissions
jllogger.use: Allows access to /jl show and /jl player. (Default: OP)
jllogger.admin: Allows access to /jl reload. (Default: OP)
Configuration
You can change the plugin language in config.yml:
# Language: ja (Japanese), en (English)
language: en
Messages are stored in messages_ja.yml and messages_en.yml respectively.
Version
The plugin follows a date-based versioning scheme (e.g., 1.26.02.06.1).
Build
To build the plugin from source, ensure you have Maven and JDK 21 installed:
mvn clean package
The resulting JAR file will be in the target/ directory.
Source
GitHub
评论 0
登录后参与评分
还没有评论,来抢沙发吧