LogBlock – 高级方块日志记录与管理工具
LogBlock 是一款轻量且功能强大的 Minecraft 插件,用于追踪服务器上的玩家操作。专为希望全面掌控方块事件的管理员设计,该插件可实时记录方块的放置、破坏以及玩家交互行为,并提供易于使用的管理工具来监控和调查活动情况。
特性
- 全面的方块追踪: 自动记录方块的放置与破坏,包含玩家、位置、类型和时间戳信息。
- 管理工具: 特殊的“日志棒”允许管理员在游戏内直接检查方块日志。
- 持久化存储: 使用 SQLite 配合 HikariCP 实现快速可靠的数据管理。
- 事件日志 API: 易于扩展,支持自定义日志记录或与其他插件集成。
- 基于权限的访问控制: 仅拥有
logblock.admin 权限的玩家可使用管理命令。
- 极小的性能影响: 优化的数据库连接和异步日志记录确保游戏流畅运行。
命令
/logblock getstick – 给予管理员一根用于检查方块日志的特殊木棍。
适用场景
- 希望防止恶意破坏(griefing)或追踪玩家活动的服务器。
- 需要可靠、实时日志解决方案的管理员。
- 任何希望获得高级、轻量级日志工具的 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
登录后参与评分
还没有评论,来抢沙发吧