LogBlock – 高级方块日志记录与管理工具
LogBlock 是一款轻量且强大的 Minecraft 插件,用于追踪服务器上玩家的每一个操作。该插件专为希望全面掌控方块事件的管理人员设计,能够实时记录方块的放置、破坏以及玩家交互行为,并提供易于使用的管理工具来监控和调查相关活动。
功能特性
- 全面的方块追踪:自动记录方块的放置与破坏,包含玩家信息、位置、方块类型及时间戳。
- 管理工具:特殊的“日志棍”允许管理员在游戏内直接检查方块日志。
- 持久化存储:使用 SQLite 配合 HikariCP,实现快速可靠的数据管理。
- 事件日志 API:易于扩展,支持自定义日志记录或与其他插件集成。
- 基于权限的访问控制:仅拥有
logblock.admin 权限的玩家才能使用管理命令。
- 极小的性能影响:优化的数据库连接和异步日志记录确保游戏流畅运行。
命令
/logblock getstick – 给管理员发放一根特殊的手杖,用于检查方块日志。
适用场景
- 旨在防止恶意破坏或追踪玩家活动的服务器。
- 需要可靠、实时日志解决方案的管理员。
- 任何希望获得高级、轻量级日志工具的 Minecraft 服务器。
与 Timber 的集成
LogBlock 可与 Timber 插件配合使用,以增强树木砍伐的日志记录与监控功能。当安装了 Timber 后,LogBlock 会详细记录由砍树行为导致的方块破坏日志,从而允许服务器管理员:
- 追踪哪些玩家正在砍伐树木。
- 监控大规模伐木事件。
- 调查与树木采伐相关的意外或恶意破坏行为。
- 将砍树行为整合到自定义分析或管理工具中。
此集成确保了所有 Timber 的操作都能被安全地实时记录,并可通过 LogBlock 的 API 进行访问,为您的服务器提供完整的林业活动审计追踪。
将 LogBlock 用作 API
LogBlock 不仅仅是一个插件——它还提供了一个完全可访问的 API供开发者使用。您可以将其集成到自己的插件或工具中,以实时获取方块日志、玩家操作和历史数据。
使用示例
LogBlockApi api = LogBlock.getLogBlockApi();
// 获取所有日志条目 List logs = api.getLogEntry();
// 添加自定义日志 LogEntry customLog = new LogEntry(playerUUID, x, y, z, world, LogEntry.BlockAction.PLACE, Material.STONE, System.currentTimeMillis()); api.addLogEntry(customLog);
// 获取特定方块位置的最后一次操作 LogEntry last = api.getLastLogAtLocation("world", 100, 64, -200);
LogBlock – Advanced Block Logging & Admin Tools
LogBlock is a lightweight and powerful Minecraft plugin that tracks every player action on your server. Designed for admins who want full control over block events, this plugin logs block placement, block breaking, and player interactions in real-time, while providing easy-to-use admin tools for monitoring and investigating activity.
Features
- Comprehensive Block Tracking: Automatically logs block placements and breaks with player, location, type, and timestamp.
- Admin Tools: Special "Log Stick" lets admins inspect blocks directly in-game.
- Persistent Storage: Uses SQLite with HikariCP for fast, reliable data management.
- Event Logging API: Easily extendable for custom logging or integration with other plugins.
- Permission-Based Access: Only players with
logblock.admin can use admin commands.
- Minimal Performance Impact: Optimized database connections and asynchronous logging ensure smooth gameplay.
Commands
/logblock getstick – Gives an admin a special stick to inspect block logs.
Perfect for
- Servers looking to prevent griefing or track player activity.
- Admins who need a reliable, real-time logging solution.
- Any Minecraft server wanting advanced, lightweight logging tools.
Integration with Timber
LogBlock can be used alongside the Timber plugin to enhance tree logging and monitoring. When Timber is installed, LogBlock records detailed logs of block breaks caused by tree chopping, allowing server admins to:
- Track which players are cutting trees.
- Monitor large-scale logging events.
- Investigate accidental or intentional griefing related to tree harvesting.
- Integrate tree-cutting actions into custom analytics or administrative tools.
This integration ensures that all Timber actions are safely logged in real-time and can be accessed via LogBlock’s API, providing a full audit trail of forestry activities on your server.
Using LogBlock as an API
LogBlock is not just a plugin—it also provides a fully accessible API for developers. You can integrate it into your own plugins or tools to access block logs, player actions, and history data in real-time.
Example Usage
LogBlockApi api = LogBlock.getLogBlockApi();
// Get all log entries List logs = api.getLogEntry();
// Add a custom log LogEntry customLog = new LogEntry(playerUUID, x, y, z, world, LogEntry.BlockAction.PLACE, Material.STONE, System.currentTimeMillis()); api.addLogEntry(customLog);
// Get the last action at a specific block LogEntry last = api.getLastLogAtLocation("world", 100, 64, -200);
评论 0
登录后参与评分
还没有评论,来抢沙发吧