legacy-lands-library - 面向 Minecraft 服务器开发的企业级模块化框架

原创 开源 前置/API 工具 legacy-lands-library - 面向 Minecraft 服务器开发的企业级模块化框架 1.2.10-SNAPSHOT-09-11-26-105043

完成注册/登录后下载
版权类型
原创
插件中文名称
遗迹之地开发框架
插件英文名称
legacy-lands-library
原帖地址
#
支持的核心(服务端)
  1. Spigot
  2. Paper
  3. Folia
  4. Purpur
  5. PufferFish
  6. Leaves
  7. 其他核心
语言支持
中文(简体)
前置组件
fairy https://github.com/FairyProject/fairy
适配版本(Java)
  1. 最新版本
  2. 26.x
  3. 1.21
  4. 1.20
  5. 1.19
  6. 1.18
  7. 1.17
  8. 1.16
[MD] ## 概述 这是一个基于 [Fairy Framework](https://github.com/FairyProject/fairy) 构建的模块化插件工具库,采用模块化设计,深度利用 Java 21 现代化特性。 为现代 Minecraft 插件开发提供了必要的工具和实用程序,跨平台支持 Spigot、Paper 和 Folia。 ## 快速上手 **1. 添加仓库与所需模块**(无需任何认证): ```kotlin repositories { maven("https://repo.qwqdev.top/releases") } dependencies { compileOnly("net.legacy.library:annotation:<版本号>") } ``` 最新的 `<版本号>` 见[仓库](https://repo.qwqdev.top/#/releases/net/legacy/library)。 **2. 服务器安装**:将 [fairy-lib-plugin](https://github.com/FairyProject/fairy-lib-plugin) 以及所用模块(包括其依赖的模块)的 jar 放入 `plugins` 文件夹。 **3. 声明依赖**,确保你的插件在库之后加载: ```kotlin fairy { bukkitProperties().depends.add("annotation") } ``` ## 核心模块 - [**foundation**](https://github.com/LegacyLands/legacy-lands-library/blob/main/foundation/README_ZHCN.md) - 核心基础模块,为所有库模块提供基本的测试基础设施、工具类和基础抽象。 - [**annotation**](https://github.com/LegacyLands/legacy-lands-library/blob/main/annotation/README_ZHCN.md) - 强大的注解处理框架,具有灵活的扫描选项和生命周期管理。 - [**aop**](https://github.com/LegacyLands/legacy-lands-library/blob/main/aop/README_ZHCN.md) - 企业级面向切面编程框架,具有 ClassLoader 隔离功能,提供性能监控、线程安全、日志记录和异常处理切面。 - [**commons**](https://github.com/LegacyLands/legacy-lands-library/blob/main/commons/README_ZHCN.md) - 基础工具集,包括 VarHandle 注入、任务调度、虚拟线程调度、JSON 操作和随机对象生成。。 - [**configuration**](https://github.com/LegacyLands/legacy-lands-library/blob/main/configuration/README_ZHCN.md) - 基于 SimplixStorage 构建的灵活配置框架,支持序列化。 - [**mongodb**](https://github.com/LegacyLands/legacy-lands-library/blob/main/mongodb/README_ZHCN.md) - 基于 Morphia 的精简 MongoDB 集成,用于高效数据持久化。 - [**cache**](https://github.com/LegacyLands/legacy-lands-library/blob/main/cache/README_ZHCN.md) - 集成 Caffeine 和 Redis 的多级缓存系统,具有全面的锁机制与通用的线程安全资源管理框架。 - [**player**](https://github.com/LegacyLands/legacy-lands-library/blob/main/player/README_ZHCN.md) - 企业级分布式数据管理框架,构建高性能实体-关系数据层。能够 **无缝处理数千实体间** 的关系网络与状态同步。 - [**script**](https://github.com/LegacyLands/legacy-lands-library/blob/main/script/README_ZHCN.md) - 这是一个强大、灵活、可拓展且高性能的脚本执行引擎封装,支持 `Rhino`, `Nashorn`, `V8` 三种 `JavaScript` 引擎。 - [**experimental**](https://github.com/LegacyLands/legacy-lands-library/blob/main/experimental/README.md) - 一些实验性的模块,可以显著提高性能,但可能过于复杂而无法使用或暂时不稳定。 - [**third-party-schedulers**](experimental/third-party-schedulers/README.md) - 通过 gRPC 外部任务调度器实现分布式任务处理(目前基于 Rust 实现),从而实现大型插件解耦和性能提升(适用于不需要访问 Bukkit API 的后端)。 非常适合机器学习、反作弊大数据计算、数学和类似应用。 - **security** - *即将推出。* ## 使用方法 ### 分发包说明 从 [Actions](https://github.com/LegacyLands/legacy-lands-library/actions) 下载: - `-javadoc`:生成的 API 文档 - `-plugin`:可直接用于服务器的编译插件 - `-sources`:包含源代码和编译类(推荐用于开发) 每个模块的 `README` 中都有详细文档 ### Maven 仓库 无需任何认证。 Gradle(Kotlin DSL): ```kotlin repositories { maven("https://repo.qwqdev.top/releases") } dependencies { compileOnly("net.legacy.library:模块名称:版本号") } ``` Maven: ```xml <repositories> <repository> <id>legacy-lands</id> <url>https://repo.qwqdev.top/releases</url> </repository> </repositories> <dependencies> <dependency> <groupId>net.legacy.library</groupId> <artifactId>模块名称</artifactId> <version>版本号</version> <scope>provided</scope> </dependency> </dependencies> ``` 可在 [repo.qwqdev.top](https://repo.qwqdev.top/#/releases/net/legacy/library) 浏览所有可用版本。 #### GitHub Packages 构件同时也会发布到 GitHub Packages,使用前需要配置 GitHub 认证([了解更多](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)) ```kotlin repositories { maven { url = uri("https://maven.pkg.github.com/LegacyLands/legacy-lands-library") credentials { username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") } } } dependencies { compileOnly("net.legacy.library:模块名称:版本号") } ``` ### 版本说明 虽然版本号目前仍是 SNAPSHOT,但这并不代表它不能用于生产环境。事实上,我们计划在一个大型插件开发项目中广泛使用此版本,并在充分验证其稳定性和功能性后,发布第一个正式版本。 ## 社区 - [English Version](README.md) - [QQ 群](http://qq.legacylands.cn) - [Github Issues](https://github.com/LegacyLands/legacy-lands-library/issues) - [哔哩哔哩](https://space.bilibili.com/1253128469)(中文教程) 我们将在 [哔哩哔哩](https://space.bilibili.com/1253128469) 频道发布更多关于此模块和 [Fairy Framework](https://github.com/FairyProject/fairy) 的开发教程与经验分享! ## 赞助商 本项目由 [LegacyLands](https://github.com/LegacyLands) 全力赞助和维护。 ![legacy-lands-logo.png](https://github.com/LegacyLands/legacy-lands-library/blob/main/legacy-lands-logo.png?raw=true) [Luminol](https://github.com/LuminolMC/AboutCanvas) 是一个基于 Folia 的分支,具有许多有用的优化、可配置的原版特性和更多的 API支持。 看到一个凝聚了无数不眠之夜与社区热爱的优秀开源项目被迫暂停,我们深感痛心与愤慨。这一切的始作俑者 Canvas,公然剽窃并洗稿代码,抹杀原作者的署名与贡献,肆意践踏 GPL-3.0 许可证。开源绝非剽窃者掠夺他人辛勤劳动成果的避风港。Canvas 这种窃取成果却抹去所有贡献者印记的卑劣行径,不仅是对 Luminol 团队及所有贡献者的公然侮辱,更是对整个 Minecraft 开源生态系统的毁灭性打击。 **我们坚定地与 Luminol 站在一起,对 Canvas 表示最强烈的谴责并予以彻底抵制——建立在窃取之上的基石注定无法长久,背弃开源精神的剽窃者终将被社区所唾弃!** ![luminol-mc-logo.png](https://github.com/LegacyLands/legacy-lands-library/blob/main/luminol-mc-logo.png?raw=true) 本项目由 YourKit 提供的 [Java](https://www.yourkit.com/java/profiler/) 与 [.NET](https://www.yourkit.com/dotnet-profiler/) 性能分析工具驱动。 ![yklogo.png](https://github.com/LegacyLands/legacy-lands-library/blob/main/yklogo.png?raw=true) ## 贡献 我们热烈欢迎更多开发者加入我们的开源项目,贡献自己的力量。无论是分享想法、创建 Issue,还是提交 Pull Request,每一份贡献都是有意义的! 我们对使用 AI 非常宽容。您可以使用任何 AI 来编写和贡献代码,只要它能正常工作并满足 [CLAUDE.md](https://github.com/LegacyLands/legacy-lands-library/blob/main/CLAUDE.md) 中的要求即可。 ## 未来计划 我们将这个库作为维持整个服务器运行(LegacyLands Minecraft 服务器)的主要依赖,并正在积极引入 Scala 3。未来将进行小部分的非破坏性迁移到 Scala 3,利用其优越的类型系统、并发模型和函数式编程能力来获得更好的性能和可维护性。 ## Star 历史 [![Star History Chart](https://api.star-history.com/chart?repos=LegacyLands/legacy-lands-library&type=date&legend=top-left)](https://www.star-history.com/?type=date&repos=LegacyLands%2Flegacy-lands-library) [/MD]
作者
2000000
下载
0
查看
1
首次发布
最后更新

评分

0.00 星 0 次评分
后退
顶部 底部