GameLib
一个用于 Minecraft 插件开发的综合类库,提供游戏管理、玩家追踪、GUI 系统、库存工具等功能。旨在简化和加速高级小游戏及服务器功能的开发。
多个 TMG 小游戏 所依赖。
使用方法
- GameLib 是一个库插件。如果存在,TMG 的小游戏会自动使用它。
- 你无需直接配置 GameLib。
- 如果某个插件需要 GameLib,请确保它在你的
plugins 文件夹中存在且为最新版本。
功能特性
- GameManager:完整的游戏生命周期管理,包括准备阶段、宽限期、计时器、世界边界、Boss 条和自定义事件
- PlayerActions:玩家状态管理(生命值、饥饿值、经验值、效果、库存、进度)
- Compass Tracking:带有目标选择交互式 GUI 的玩家追踪指南针
- Inventory System:套装、条件物品模板、物品集和自定义槽位布局
- GUI System:带有点击事件的交互式库存 GUI 及自动清理功能
- Timer:倒计时、循环和延迟执行计时器
- Score:简化的计分板管理
- Chat:消息发送、动作栏、颜色代码和格式化实用工具
- BlockFill:在两个位置之间用指定材料填充区域
- Logger:统一日志记录(信息、警告、错误)
- Utilities:区块强制加载、物品创建、旁观者模式辅助功能
注意事项
- GameLib 设计为供其他插件作为依赖使用。它本身不提供任何游戏玩法功能。
- 如果你使用的插件依赖于 GameLib,请确保保持其更新。
- 有关使用 GameLib 的插件示例,请参阅 TMG 小游戏。
开发
如果你是开发者并希望在你的插件中使用 GameLib,你可以将其作为依赖项包含在你的构建系统中(教程见此处)
问题反馈
如果你发现任何问题或有改进建议,请在 issues 页面 进行报告。
GameLib
A comprehensive library for Minecraft plugin development, providing game management, player tracking, GUI systems, inventory utilities, and more. Designed to simplify and speed up the creation of advanced minigames and server features.
Required by several TMG minigames.
Usage
- GameLib is a library plugin. TMG's minigames will automatically use it if present.
- You do not need to configure GameLib directly.
- If a plugin requires GameLib, make sure it is present and up to date in your
plugins folder.
Features
- GameManager: Complete game lifecycle with prepare phase, grace period, timers, world borders, boss bars, and custom events
- PlayerActions: Player state management (health, hunger, XP, effects, inventories, advancements)
- Compass Tracking: Player tracking compasses with interactive GUI for target selection
- Inventory System: Kits, conditional item templates, item sets, and custom slot layouts
- GUI System: Interactive inventory GUIs with click events and automatic cleanup
- Timer: Countdown, loop, and delayed execution timers
- Score: Simplified scoreboard management
- Chat: Messaging, action bars, color codes, and formatting utilities
- BlockFill: Fill regions between two locations with materials
- Logger: Unified logging (info, warn, error)
- Utilities: Chunk force-loading, item creation, spectator mode helpers
Notes
- GameLib is designed to be used as a dependency by other plugins. It does not provide gameplay features on its own.
- Make sure to keep GameLib updated if you use plugins that depend on it.
- For examples of plugins using GameLib, see TMG minigames.
Development
If you are a developer and want to use GameLib in your plugin, you can include it as a dependency in your build system (tutorial here)
Issues
If you find any issues or have suggestions for improvements, please report them on the issues page.
评论 0
登录后参与评分
还没有评论,来抢沙发吧