MongoDB Loader

MongoDB Loader

Modern MongoDB connectivity for Minecraft servers. One jar that auto-detects Bukkit, Spigot, Paper, BungeeCord, Velocity or Sponge and bundles the latest MongoDB Java driver. A dependency library: other plugins use it, it adds no gameplay itself.

87 downloads 0 followers

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-<version>.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)

depend: [MongoDBLoader]
# or, if optional
softdepend: [MongoDBLoader]

BungeeCord (bungee.yml)

depends: [MongoDBLoader]
# or, if optional
softDepends: [MongoDBLoader]

Velocity (velocity-plugin.json)

{
  "dependencies": [
    { "id": "mongodb-loader", "optional": false }
  ]
}

Sponge

@Plugin("your-plugin-id")
@Dependency("mongodb-loader")
public class YourPlugin {
    // ...
}

Then use the driver as normal:

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: https://github.com/AshleyThew/mongodb-loader

No gallery available for this project.

Version Minecraft Loader Download

5.13.0

1.13, 1.13.1, 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2, 26.3
bukkit, bungeecord, paper, spigot, sponge, velocity
Download

5.12.0

1.13, 1.13.1, 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2, 26.3
bukkit, bungeecord, paper, spigot, sponge, velocity
Download

5.11.1

1.13, 1.13.1, 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2
bukkit, bungeecord, paper, spigot, sponge, velocity
Download

5.11.0

1.13, 1.13.1, 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2
bukkit, bungeecord, paper, spigot, sponge, velocity
Download