https://github.com/carmjos/mineuser
MineCraft服务器通用用户键值调取、查询接口。
https://github.com/carmjos/mineuser
bungeecord-plugin framework minecraft-plugin spigot-plugin user velocity-plugin
Last synced: about 1 year ago
JSON representation
MineCraft服务器通用用户键值调取、查询接口。
- Host: GitHub
- URL: https://github.com/carmjos/mineuser
- Owner: CarmJos
- License: lgpl-3.0
- Created: 2025-01-16T17:09:22.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-11T20:40:12.000Z (about 1 year ago)
- Last Synced: 2025-03-11T21:32:52.999Z (about 1 year ago)
- Topics: bungeecord-plugin, framework, minecraft-plugin, spigot-plugin, user, velocity-plugin
- Language: Java
- Homepage:
- Size: 308 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
```text
__ ____ __ __
/ |/ (_)__ ___ / / / /__ ___ _______
/ /|_/ / / _ \/ -_) /_/ (_- -_) __(_-<
/_/ /_/_/_//_/\__/\____/___/\__/_/ /___/
```
# MineUser
[](https://github.com/CarmJos/MineUser/releases)
[](https://www.gnu.org/licenses/lgpl-3.0.html)
[](https://github.com/CarmJos/MineUser/actions/workflows/maven.yml)


MineCraft服务器通用用户键值调取、查询接口。
## 开发
本插件/依赖库提供了一个通用的用户键记录,其格式如下
```java
record UserKey(
long id, @NotNull UUID uuid,
@NotNull String name
)
```
而通过 `MineUserAPI` 入口类,您可以快速操作以下方法:
- `@Nullable UserKey key(UserKeyType> type, Object param)`
- `@Nullable UserKey key(long id)`
- `@Nullable UserKey key(@NotNull UUID uuid)`
- `@Nullable UserKey key(@NotNull String username)`
- `@Nullable Long uid(@NotNull String username)`
- `@Nullable Long uid(@NotNull UUID userUUID)`
- `@Nullable String username(long id)`
- `@Nullable String username(@NotNull UUID userUUID)`
- `@Nullable UUID uuid(long id)`
- `@Nullable UUID uuid(@NotNull String username)`
对键值对的获取有基于Redis的预先缓存,但仍然建议您在使用时进行异步操作。
### 依赖方式
#### Maven 依赖
远程库配置
```xml
MineUser
GitHub Packages
https://maven.pkg.github.com/CarmJos/MineUser
carm-repo
Carm's Repo
https://repo.carm.cc/repository/maven-public/
```
通用原生依赖
```xml
cc.carm.lib
mineuser-api
[LATEST RELEASE]
compile
```
#### Gradle 依赖
远程库配置
```groovy
repositories {
// 采用github依赖库,实时更新,但需要配置 (推荐)
maven { url 'https://maven.pkg.github.com/CarmJos/MineUser' }
// 采用我的私人依赖库,简单方便,但可能因为变故而无法使用
maven { url 'https://repo.carm.cc/repository/maven-public/' }
}
```
通用原生依赖
```groovy
dependencies {
api "cc.carm.lib:mineuser-api:[LATEST RELEASE]"
}
```
## 支持与捐赠
若您觉得本插件做的不错,您可以通过捐赠支持我! 感谢您对开源项目的支持!
## 开源协议
本项目源码采用 [GNU LESSER GENERAL PUBLIC LICENSE](https://www.gnu.org/licenses/lgpl-3.0.html) 开源协议。