HomeJavaModsMongoDB-Loader
MongoDB-Loader
# MongoDB Loader Modern MongoDB database connectivity for Minecraft servers. MongoDB Loader is a library plugin that gives other plugins a working MongoDB connection. It bundles the current `mongodb-driver-sync` library, so plugins that need a database do not each have to ship their own driver. **It adds no gameplay features on its own.** It is a dependency: install it, and the plugins that need MongoDB will use it. ## Key features - **Universal platform support.** Works across Bukkit, Spigot, Paper, BungeeCord, Velocity and Sponge. - **Latest MongoDB driver**, kept current. - **Automatic platform detection.** A single jar works everywhere. - **Zero configuration.** Drop it in and start the server. - **Developer friendly**, with a small integration surface. - **Performance optimised**, minimal overhead and efficient connections. ## Installing Download `mongodb-loader-.jar` and put it in: | Platform | Folder | |---|---| | Bukkit, Spigot, Paper | `plugins/` | | BungeeCord | `plugins/` | | Velocity | `plugins/` | | Sponge | `mods/` | Start the server and it detects the platform by itself. Then install whatever plugins depend on it. ## For plugin developers Declare it as a dependency: **Bukkit, Spigot, Paper** (`plugin.yml`) ```yaml depend: [MongoDBLoader] # or, if optional softdepend: [MongoDBLoader] ``` **BungeeCord** (`bungee.yml`) ```yaml depends: [MongoDBLoader] # or, if optional softDepends: [MongoDBLoader] ``` **Velocity** (`velocity-plugin.json`) ```json { "dependencies": [ { "id": "mongodb-loader", "optional": false } ] } ``` **Sponge** ```java @Plugin("your-plugin-id") @Dependency("mongodb-loader") public class YourPlugin { // ... } ``` Then use the driver as normal: ```java import com.mongodb.client.MongoClient; import com.mongodb.client.MongoClients; import com.mongodb.client.MongoDatabase; import org.bukkit.plugin.java.JavaPlugin; public class YourPlugin extends JavaPlugin { private MongoClient mongoClient; private MongoDatabase database; @Override public void onEnable() { mongoClient = MongoClients.create("mongodb://localhost:27017"); database = mongoClient.getDatabase("minecraft_server"); getLogger().info("Connected to MongoDB!"); } } ``` ## Compatibility Minecraft 1.13 and newer. Server side only. Source and issues:
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

MongoDB-Loader is a free Minecraft Java mod. Compatible with Minecraft 1.13, 1.13.1, 1.13.2, 1.14 and newer. Available via Hangar. Download it and open it directly in the game.

Explore more