Minecraft PostgreSQL JDBC
Universal jar shipping the PostgreSQL JDBC driver as a Bukkit/Spigot/Paper plugin and Fabric/Forge/NeoForge mod.
介绍
PostgreSQL JDBC
The official PostgreSQL JDBC driver (pgjdbc) repackaged as a Bukkit/Spigot/Paper plugin and a Fabric/Forge/NeoForge mod. One universal jar covers every supported loader and MC version.
The mod does nothing on its own — it exists so plugins or mods that want to talk to a PostgreSQL database don’t each have to bundle their own copy of the driver.
What’s in the jar
org.postgresql:postgresql:42.7.5 plus minimal loader stubs for Spigot, Forge 1.12, Forge 1.13–1.16, Forge 1.17–1.20, NeoForge 1.21+, and Fabric. The driver classes stay at their canonical org.postgresql.* paths — no relocation — so consumers find them with plain Class.forName("org.postgresql.Driver"). META-INF/services/java.sql.Driver is preserved so the driver auto-registers with DriverManager.
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 (pgjdbc 42.x baseline).
Using it from a plugin or mod
Declare pgjdbc as compileOnly against the same version this jar ships:
compileOnly("org.postgresql:postgresql:42.7.5")
Probe at startup. Fall through gracefully if the operator hasn’t installed this:
try {
Class.forName("org.postgresql.Driver");
} catch (ClassNotFoundException e) {
getLogger().warning("PostgreSQL backend disabled — install minecraft-postgresql-jdbc");
return;
}
try (Connection c = DriverManager.getConnection(url, user, password)) {
// ...
}
On Paper 1.17+ each plugin’s classloader is isolated. Add this mod to your plugin.yml softdepend so the driver classes are visible to your plugin:
softdepend: [minecraft-postgresql-jdbc]
Fabric and NeoForge unify all mods on one classloader, so no equivalent declaration is needed there.
Versioning
The jar version tracks pgjdbc one-to-one. 42.7.5+2026-04-25 ships pgjdbc 42.7.5; the suffix is the build date. A scheduled GitHub Action checks Maven Central daily — when pgjdbc cuts a new release, it opens an auto-merge PR and the Modrinth release goes out automatically.
License
The driver is BSD-2-Clause (PostgreSQL Global Development Group). The repackage adds no functional changes and inherits that license. Full text in LICENSE.
Issues, source: GitHub.
常见问题
Minecraft PostgreSQL JDBC 支持哪些 Minecraft 版本?
Minecraft PostgreSQL JDBC 支持 Minecraft Java 版 1.12.2–26.3,共 52 个版本,可用的加载器:Bukkit / Fabric / Folia / Forge / NeoForge / Paper / Purpur / Quilt / Spigot。下载时注意选择和你游戏版本一致的文件。
Minecraft PostgreSQL JDBC 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Bukkit / Fabric / Folia / Forge / NeoForge / Paper / Purpur / Quilt / Spigot,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。
Axionize 的其他作品
查看全部 →
Grim Anticheat
完全异步、多线程、预测型、开源;3.01 攻击距离、1.005 倍计时、0.01% 移速、99.99% 抗击退,可“绕过”1.8–1.21 版本的反作弊。
Lightning Grim Anticheat
Anticheat Perfected | 3.0005 reach | 99.999% antikb. Fork of GrimAC that's faster, with better reach checks, interact checks, and numerous bug fixes.
KnockbackSync
Say goodbye to lag-induced knockback woes, delivering fair and consistent PvP battles for all players, no matter their ping!
Minecraft SQLite JDBC
Up-to-date SQLite JDBC driver wrapped as a universal Forge/Fabric/Bukkit library for plugins like Dynmap and Grim.
评论
登录后评论和评分