Jedis Redis 客户端(Minecraft 版)
Jedis 是目前最流行的 Java Redis 客户端,现已打包为 Bukkit/Spigot/Paper 插件以及 Fabric/Forge/NeoForge 模组。
该模组本身并不执行任何操作——它的作用是将 Jedis(及其运行时依赖项)部署到服务器的类路径中,以便其他插件/模组能够直接使用,而无需各自捆绑一份副本。
Jar 包内容
Jedis 加上其所需的四个运行时依赖项:
redis.clients:jedis:5.2.0— 客户端本体org.apache.commons:commons-pool2— 连接池(Jedis 使用此库实现JedisPool)com.google.code.gson:gson— JSON 序列化org.json:json— JSON 解析org.slf4j:slf4j-api— 日志门面
slf4j-api 已嵌入(shaded)到此 jar 包中,因为 Spigot 1.8 的类路径中不包含它。在已经拥有 slf4j 的平台(现代 Paper、Fabric、NeoForge)上,重复包含无害——slf4j-api 仅包含接口,不存在绑定冲突。
提供了针对 Spigot、Forge 1.12、Forge 1.13–1.16、Forge 1.17–1.20、NeoForge 1.21+ 和 Fabric 的加载器存根。未进行重定位(relocation)——redis.clients.jedis.*、org.apache.commons.pool2.* 等包名保持在其标准路径下。
兼容性
| 加载器 | Minecraft 版本 | 备注 |
|---|---|---|
| Bukkit / Spigot / Paper / Folia / Purpur | 1.8 → 当前最新版 | 放入 plugins/ 目录 |
| Fabric | 1.16.1 → 当前最新版 | 需要 Fabric Loader 0.14+ |
| Forge | 1.12 → 1.20 | 通用 jar,无 Mixins |
| NeoForge | 1.21 → 当前最新版 | 放入 mods/ 目录 |
需要 Java 8+(Jedis 5.x 的基础要求)。
从插件或模组中使用
compileOnly("redis.clients:jedis:5.2.0")
启动时探测:
try {
Class.forName("redis.clients.jedis.Jedis");
} catch (ClassNotFoundException e) {
getLogger().warning("Redis 后端已禁用 — 请安装 minecraft-jedis");
return;
}
try (JedisPool pool = new JedisPool(host, port);
Jedis jedis = pool.getResource()) {
jedis.set("hello", "world");
}
对于 Paper 1.17+,请在你的 plugin.yml 中添加 softdepend: [minecraft-jedis]。Fabric 和 NeoForge 不需要类似配置。
对于 Redis 6+ ACL 认证,请传入 user 和 password;对于旧版 Redis 仅需 password。如果需要 TLS,可配置 JedisClientConfig(基本的 JedisPool 构造函数中未内置此功能)。
版本说明
Jar 包版本与 Jedis 版本一一对应。5.2.0+2026-04-25 表示包含 Jedis 5.2.0,以及构建时最新的 commons-pool2/gson/json/slf4j-api 依赖。自动更新每日运行——当 Jedis 发布新版本时,依赖树会随之更新。
许可证
MIT(Jedis 贡献者)。重新打包未添加任何功能性更改。完整文本见 LICENSE。
问题反馈、源码:GitHub。
Jedis Redis Client for Minecraft
Jedis, the most widely used Java Redis client, repackaged as a Bukkit/Spigot/Paper plugin and a Fabric/Forge/NeoForge mod.
The mod does nothing on its own — it ships Jedis (and its runtime dependencies) onto the server's classpath so other plugins/mods can use it without each bundling their own copy.
What's in the jar
Jedis plus the four runtime deps it needs:
redis.clients:jedis:5.2.0— the client itselforg.apache.commons:commons-pool2— connection pool (Jedis uses this forJedisPool)com.google.code.gson:gson— JSON serializationorg.json:json— JSON parsingorg.slf4j:slf4j-api— logging facade
slf4j-api is shaded into this jar because Spigot 1.8 doesn't ship it on the classpath. On platforms that already have slf4j (modern Paper, Fabric, NeoForge), the duplicate is harmless — slf4j-api is interface-only, no binding clash.
Loader stubs for Spigot, Forge 1.12, Forge 1.13–1.16, Forge 1.17–1.20, NeoForge 1.21+, and Fabric. No relocation — redis.clients.jedis.*, org.apache.commons.pool2.*, etc. stay at canonical paths.
Compatibility
| Loader | MC versions | Notes |
|---|---|---|
| Bukkit / Spigot / Paper / Folia / Purpur | 1.8 → current | drop into plugins/ |
| Fabric | 1.16.1 → current | needs Fabric Loader 0.14+ |
| Forge | 1.12 → 1.20 | universal jar, no Mixins |
| NeoForge | 1.21 → current | drop into mods/ |
Java 8+ required (Jedis 5.x baseline).
Using it from a plugin or mod
compileOnly("redis.clients:jedis:5.2.0")
Probe at startup:
try {
Class.forName("redis.clients.jedis.Jedis");
} catch (ClassNotFoundException e) {
getLogger().warning("Redis backend disabled — install minecraft-jedis");
return;
}
try (JedisPool pool = new JedisPool(host, port);
Jedis jedis = pool.getResource()) {
jedis.set("hello", "world");
}
On Paper 1.17+ add softdepend: [minecraft-jedis] to your plugin.yml. Fabric and NeoForge don't need anything similar.
For Redis 6+ ACL auth pass user and password; for older Redis just password. TLS is on JedisClientConfig if you need it (not wired into the basic JedisPool constructor).
Versioning
The jar version tracks Jedis one-to-one. 5.2.0+2026-04-25 ships Jedis 5.2.0 plus current commons-pool2/gson/json/slf4j-api at the time of build. Auto-bump runs daily — when Jedis releases, the dep tree moves with it.
License
MIT (Jedis contributors). The repackage adds no functional changes. Full text in LICENSE.
Issues, source: GitHub.
下载 Minecraft Jedis (Redis Driver)
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Minecraft Jedis (Redis Driver)
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Minecraft Jedis (Redis Driver)
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Minecraft Jedis (Redis Driver)
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Minecraft Jedis (Redis Driver)
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
ci:发布兼容 Fabric 游戏版本的 holders
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
ExyliaPlugins 的库。
插件
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
插件
一个在游戏内运行的 Minecraft 地图编辑器! 支持选区、蓝图、复制粘贴、笔刷和脚本。 可在创造模式中使用,也可在生存模式中临时使用。
插件
SkyBlock、OneBlock、Boxed、SkyGrid、AcidIsland、CaveBlock、Poseidon、StrangerRealms——以及更多!这些只是由 BentoBox 支持的基于岛屿的游戏模式之一。来自原版 ASkyBlock 的作者。
插件
一个强大的 API,用于为你的 Minecraft 服务器创建自定义进度。
评论 0
登录后参与评分
还没有评论,来抢沙发吧