描述:
The Minds of Chimera (MOC) Playtime Tracker 会记录玩家在线时长(总时长以及上次在线时间),并通过 MySQL 或 SQLite 数据库存储其活动的相关统计信息。同时提供前 X 名排行榜(例如在线时长排名前 5 的玩家)。
注意:虽然其他插件也能实现类似功能,但它们要么已停止维护,要么存在缺陷,要么使用平面文件存储。尽管它们做得很好,但未能满足我们的需求,因此我们创建了 Playtime Tracker 来满足我们自己,并希望满足其他一些人的需求。
功能:
- 记录玩家的在线时长。
- 以累计时长或最后上线时间的方式报告在线时长。
- 记录玩家的活动,如击杀怪物和玩家、放置/破坏方块、移动等。
- 报告不同类型的玩家活动。
- 生成玩家活动和在线时长的前 X 名排行榜。
- 将数据存储到数据库中:SQLite 或 MySQL。
- 使用缓存系统以最小化数据库读写操作并避免服务器阻塞(讨厌的单线程问题)。
媒体:
演示视频。
<p>
从版本 0.3 开始,它按世界记录玩家事件。以下是命令 "/playtimetracker user cwingrav world" 的输出显示内容,其中用户为 "cwingrav",世界名称为 "world"。
它还列出了各类别中的表现最佳者。
命令:
/playtime - 打印你的游玩时长。
/playtime sum - 打印你的游玩时长。
/playtime sum [player] - 打印指定玩家的游玩时长统计信息。
/playtime sumall - 打印所有曾登录过的玩家的游玩时长统计信息。
/playtime laston - 列出你自己的最后登录时间。
/playtime laston [player] - 列出指定玩家的最后登录时间。
/playtime lastonall - 列出所有玩家的最后登录时间。
/playtime full - 列出该玩家的累计时长和最后登录时间
/playtime full [player] - 列出指定玩家的累计时长和最后登录时间
/playtime stats (player) (world) - 打印用户在特定世界中的活动状态
/playtime debugon - 输出调试信息
/playtime debugoff - 停止输出调试信息
/playtime recountall - 强制数据库重新计算所有玩家条目。如果 'sum' 数据出错时使用。
/playtime help|? - 列出帮助信息
/playtime top [criteria] [# to print] [world] - 打印当前追踪类别的前 N 名。默认为在线时长前 5 名。
[criteria] 目前包括:online, place, destroy, die, moved, pk, hk, fk
pk=玩家击杀数,hk=敌对生物击杀数,fk=友好生物击杀数(如牛、猪等)。
权限:
- PlaytimeTracker.admin:
- description: 访问调试和清除日志的权限。
- default: op
- PlaytimeTracker.self:
- description: 允许玩家查询自己的在线时长。
- default: true
- PlaytimeTracker.player:
- description: 允许玩家查询某位玩家的在线时长或最后登录时间。
- default: false
- PlaytimeTracker.all:
- description: 允许玩家查询所有玩家的在线时长或最后登录时间。
- PlaytimeTracker.top:
- description: 允许用户列出特定值的前 X 名。
安装(及配置):
- 将 PlaytimeTracker.jar 文件添加到你的 plugins 目录中。
- 将 MOCDBLib.jar 文件添加到你的 plugins 目录中。
- 如果你连接的是 MySQL 数据库,请按照以下配置说明进行操作。
- 创建 plugins/PlaytimeTracker/DBLib.properties 文件(运行一次服务器会自动创建此文件)
- 根据你的设置配置这些选项。此处使用的是 MOCDBLib,详情请参阅其页面。
MySQL=false
host=localhost
database=playtimetracker
username=root
password=pass
port=3306
故障排除
- 一个常见的错误是跳过了 MOCDBLib.jar 插件的安装。
- 检查 server.log 文件以获取错误列表。如果发生失败,我会尽量提供详细的描述性信息。
- 在报告错误时,请列出大量的错误消息以及关于你数据库配置的信息(即 MySQL 或 SQLite)。
- /playtime recountall - 如果在线时间的统计出现混乱,此命令非常有用。
- 我会尽力提供帮助。干杯。
功能请求
- 用于设置此插件所用数据库名称的配置文件。这将允许多个服务器共用同一个 MySQL 服务器。
- /afk 支持(很有趣,可能会实现,但我需要做出大量修改来支持此功能,并确保它不会影响服务器性能)
- 将 sumall 的日志记录到服务器文件中。
- 追踪每个世界的在线时长。即 /playtime <玩家> [世界]
Description:
The Minds of Chimera (MOC) Playtime Tracker tracks time players have been online (total time as well as last time on), as well as useful stats of their activity, in a MySQL or SQLite db. Gives top X reports as well (like top 5 players in time spent playing).
NOTE: Other plugins do this but they either are discontinued, buggy or use flat files. They've done a great job but didn't fit our needs so Playtime Tracker was created to fill our, and hopefully some other people's needs.
Features:
- Log time players have been online.
- Report time online as a sum or as the last time they were on.
- Log player activities such as killing mobs and players, placing/destroying blocks, movement, etc.
- Report different player activities.
- Report top X charts of player activities and time online.
- Store data in a database: SQLite or MySQL.
- Uses a caching system to minimize database read/writes and avoid server blocking (darn single threads).
Media:
Demonstration video.
<p>
As of version 0.3, it logs player events per world. Here is what the output of: "/playtimetracker user cwingrav world" displays, where the user is "cwingrav" and the world name is "world".
It also lists the top performers in a category.
Commands:
/playtime - Prints amount of time you have played.
/playtime sum - Prints amount of time you have played.
/playtime sum [player] - Prints stats about time spent playing.
/playtime sumall - Prints stats about time spent playing for all players ever logged in.
/playtime laston - Lists last login times of self.
/playtime laston [player] - Lists last login times of the given player.
/playtime lastonall - Lists last login times of all players.
/playtime full - for the player, list their sum and laston
/playtime full [player] - for the given player, list their sum and laston
/playtime stats (player) (world) - prints user states about their activities in the world
/playtime debugon - spews debugging information
/playtime debugoff - stops spewing debugging information
/playtime recountall - forces the database to recount all player entries. Use if something is screwed up for 'sum'.
/playtime help|? - lists help
/playtime top [criteria] [# to print] [world] - Prints the top 5 in the categories this is tracking. Default is top 5 online time.
[criteria] currently include: online, place, destroy, die, moved, pk, hk, fk
pk=player kills, hk=hostile kills, fk=friendly kills (like cows, pigs, etc).
Permissions:
- PlaytimeTracker.admin:
- description: Access to debug and clear the log.
- default: op
- PlaytimeTracker.self:
- description: Gives access to discover the amount of time the player is online.
- default: true
- PlaytimeTracker.player:
- description: Gives access to discover the amount of time a player is online or last on.
- default: false
- PlaytimeTracker.all:
- description: Gives access to discover the amount of time all players are online or last on.
- PlaytimeTracker.top:
- description: Lets people list the top X for a given value.
Installation (and Configuration):
- add the PlaytimeTracker.jar file to your plugins directory.
- add the MOCDBLib.jar file to your plugins directory.
- follow the configuration instructions below if you connect to a MySQL database.
- create the plugins/PlaytimeTracker/DBLib.properties file (running the server once will create this)
- configure these options for your setup. This uses MOCDBLib for this so see its page for further details.
MySQL=false
host=localhost
database=playtimetracker
username=root
password=pass
port=3306
Troubleshooting
- A common error is to skip the installation of the MOCDBLib.jar plugin.
- Check the server.log file for a list of errors. I try to be descriptive if it fails.
- When reporting a bug, please list a lot message error and information about your database configuration (i.e. MySQL or SQLite).
- /playtime recountall - This is useful if something gets mixed up with the online time counting.
- I'll do my best to help. Cheers.
Feature Requests
- Properties file for setting the names of the databases this is using. This will allow multiple servers to run off the same MySQL server.
- /afk support (interesting, might do but I will have to make a lot of changes to support this and to make sure it doesn't impact the server)
- Log sumall to the server file.
- Track per-world time online. so, /playtime <player> [world]
评论 0
登录后参与评分
还没有评论,来抢沙发吧