{"id":27939640,"url":"https://github.com/mrxiaom/figuraauthprovider","last_synced_at":"2026-02-10T07:31:43.577Z","repository":{"id":267681890,"uuid":"901869297","full_name":"MrXiaoM/FiguraAuthProvider","owner":"MrXiaoM","description":"Minecraft Figura Mod 第三方后端 sculptor 的身份验证器","archived":false,"fork":false,"pushed_at":"2025-01-24T18:18:01.000Z","size":118,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T19:20:51.788Z","etag":null,"topics":["bukkit-plugin","bungeecord-plugin","figura","figuramc","minecraft","minecraft-plugin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrXiaoM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-11T13:19:38.000Z","updated_at":"2025-01-24T18:18:04.000Z","dependencies_parsed_at":"2024-12-11T20:26:54.107Z","dependency_job_id":"f0d08eb9-efeb-4230-b5a5-d41068620db0","html_url":"https://github.com/MrXiaoM/FiguraAuthProvider","commit_stats":null,"previous_names":["mrxiaom/figuraauthprovider"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrXiaoM%2FFiguraAuthProvider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrXiaoM%2FFiguraAuthProvider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrXiaoM%2FFiguraAuthProvider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrXiaoM%2FFiguraAuthProvider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrXiaoM","download_url":"https://codeload.github.com/MrXiaoM/FiguraAuthProvider/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252856440,"owners_count":21814853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bukkit-plugin","bungeecord-plugin","figura","figuramc","minecraft","minecraft-plugin"],"created_at":"2025-05-07T09:55:51.511Z","updated_at":"2026-02-10T07:31:43.515Z","avatar_url":"https://github.com/MrXiaoM.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FiguraAuthProvider\n\n第三方后端 [sculptor λ](https://github.com/MrXiaoM/sculptor) 的验证提供器，需要配合改版 [FiguraLambda](https://github.com/MrXiaoM/FiguraLambda) 使用。\n\n## 这是什么\n\n这是玩家模型Mod [Figura](https://modrinth.com/mod/figura) 的后端验证提供器，使得离线模式的玩家可在特定的服务器中，连接到自建后端拉取模型。\n\n由于以下原因，你需要使用 [FiguraLambda](https://github.com/MrXiaoM/FiguraLambda) 才可正常使用这套生态。\n+ Figura 前端（客户端Mod）在向后端请求验证之前，会先请求一次 Minecraft 正版验证，猜测这么做是为了减轻后端压力\n+ Figura 一旦请求验证失败，就不会再重试，除非你手动打开衣柜界面重新连接后端服务器\n\n针对上述问题，我们作了以下修改\n+ 由服主自建后端，而不是使用公共的后端，压力不会很大，直接删除正版验证请求\n+ 客户端Mod注册一个 CustomPayload 频道，接收插件的消息，收到消息时重新连接后端服务器\n\n## 这个插件如何工作\n\n本插件分为 Bukkit插件 和 代理插件 两个变种。目前所有变种均打包到了同一jar。\n\n\u003e 省流：\n\u003e + Bukkit插件 **只需要**装到登录服；如果不是离线模式，是外置登录，随便装到一个服就行\n\u003e + 将 代理插件 安装到代理端\n\u003e + 在 sculptor 的 authProviders 改为\n\u003e ```toml\n\u003e authProviders = [\n\u003e     { name = \"Local\", url = \"http://127.0.0.1:5009/hasJoined\" }\n\u003e ]\n\u003e ```\n\u003e 这样就可以了。\n\n**Bukkit插件** 至少需要 Java 8 来运行，它会开启一个 http服务器，有以下接口可使用\n+ `GET /hasJoined` 用于后端 sculptor 的 authProviders\n+ `POST /pushPlayerList` 用于接收代理端推送的全服玩家列表\n+ (这个http服务器仅用于内网，请勿公开)\n\n后端 sculptor 会向 Bukkit插件 请求，以判定是否验证通过，验证通过时会返回玩家的uuid。\n+ 玩家在线时，通过 登录插件提供器 检查验证是否通过，玩家已登录时验证通过\n+ 玩家不在线时，通过 全服玩家列表 检查验证是否通过，玩家在此列表时验证通过\n\n在安装了 Vault 以及一个权限插件（比如 LuckPerms），并且权限插件已与 Vault 进行挂钩时，  \n如果玩家有 `figura.upload` 权限，那么TA的 `canUpload` 标志为 true。  \n但请注意，玩家需要重新连接到后端（重新进入服务器），这个标志才会刷新。\n\n玩家通过登录插件登录成功后，登录验证提供器接收到通知，会向客户端发送一个 CustomPayload 包，提醒客户端应该要重新连接后端服务器了。\n\n目前支持的登录插件如下：\n+ [AuthMe](https://www.spigotmc.org/resources/6269)\n+ *欢迎提交PR，以支持更多登录插件*\n\n\u003e 关于添加登录插件支持，  \n\u003e Bukkit 平台请查看 `top.mrxiaom.figura.authprovider.PluginMain#onEnable`  \n\u003e BungeeCord 平台请查看 `top.mrxiaom.figura.bungee.PluginMain#onEnable`  \n\u003e Velocity 平台请查看 `top.mrxiaom.figura.velocity.PluginMain#onProxyInitialization`  \n\n**代理插件** 会在玩家通过代理端连接或断开连接时，向 Bukkit插件 发送当前代理端的所有玩家列表。由于 BungeeCord 必须要服务器有玩家才能通信，只能这么办了。  \n目前支持的代理端如下：（包括其衍生代理端）\n+ BungeeCord (至少需要 Java 8)\n+ Velocity (至少需要 Java 17)\n\n## 构建\n\n使用 Java 17 构建，除了 velocity 模块以外，其它模块均兼容至 Java 8。\n```shell\n./gradlew clean build\n```\n构建产物会出现在 `out` 目录。\n\n## 鸣谢\n\n+ [FiguraMC/Figura](https://github.com/FiguraMC/Figura): 强大的玩家模型修改Mod，这个项目的基础 —— LGPL-2.1 License\n+ [shiroyashik/sculptor](https://github.com/shiroyashik/sculptor): 第三方Figura后端，使得自定义验证方式成为可能 —— GPL-3.0 License\n\n## Figura Lambda 生态软件\n\n+ [FiguraLambda](https://github.com/MrXiaoM/FiguraLambda): 客户端Mod\n+ [sculptor](https://github.com/MrXiaoM/sculptor): 第三方后端(fork)\n+ [FiguraAuthProvider](https://github.com/MrXiaoM/FiguraAuthProvider): 服务端/代理端 玩家验证插件 `\u003c-- 你在这里`\n+ [FiguraAvatars](https://github.com/MrXiaoM/FiguraAvatars): 服务端 模型管理插件\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrxiaom%2Ffiguraauthprovider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrxiaom%2Ffiguraauthprovider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrxiaom%2Ffiguraauthprovider/lists"}