About SQLibrary for Spigot
From SpigotMCA Powerful Database Modeling and Connection Handling SQL Library
SQLibrary for Spigot - Database Development Made Easy
Version: 1.1.0-SNAPSHOT
SQLibrary is Powerful Utility for establishing SQL Database Connections and Creating Powerful Database Models Similar to Laravel's Eloquent Database Modeling Library for PHP.
Disclaimer: This plugin is a utility designed for Developers to assist in developing plugins using SQL Databases and only serves as a requirement for those plugins to work.
Features:
- An Easy Method of Establishing MySQL and SQLite Connections including an API to support any SQL server.
- A Powerful Database Factory / Model Building Library allowing a developer to add SQL support to any application without needing to know any SQL syntax.
- Individual SQL Server wrapping profiles designed to automatically escape, wrap and build SQL statements and prevent SQL injection.
- Code Based Condition Building Library for use with building Models.
- FieldFormat Library to automatically parse database fields when loaded to and from Database Models.
Alternate SQLibrary Downloads:
SQLibrary Standalone: Download
SQLibrary-BungeeCord: Download
Adding SQLibrary to your Project:
Include the Following in your plugin.yml and you're ready to go.
As the documentation for SQLibrary has not yet been written I have created an example project would should demonstrate the usage of SQLibrary. I will be developing a model capable of storing player group and balance information.
I will be using the following fields:
- player_id (Primary Key)
- player_uuid (Player UUID)
- group (Player Group VARCHAR)
- balance (Player Balance DOUBLE)
Firstly to create model capable of building and interacting with a database using the fields above I need 3 things:
- A DatabaseConnection either MySQLConnection or SQLiteConnection
- A DatabaseModel containing all the specified fields. Each initialized object of this model will represent 1 row / entity in the database.
- A ModelFactory designed to perform queries and interact with the database based on the provided model.
The Steps are as Follows:
- Step 1: Create a Database Connection
- Step 2: Create the Player Model
- Step 3: Create The Player ModelFactory
Once these steps are all completed we can move onto some examples.
Step 1: Creating a DatabaseConnection.
SQLibrary currently supports 2 forms of SQL Server Support. MySQL and SQLite. It is up to you as a Developer to decide which your plugin will support or both! Remember you will need to setup an additional set of models and factories in your project to support the different Database Requirements.
//Creating a MySQLConnection
DatabaseConnection connection = new MySQLConnection(host, port, database, user, pass);
//Creating a SQLiteConnection
DatabaseConnection connection = new SQLiteConnection(new File("my.db");
//Opening a DatabaseConnection
connection.openConnection();
}
Step 2: Create the Player Model.
Now we have setup our DatabaseConnection we now need to develop our player Model. As stated above the PlayerModel when initialized represents 1 entry in a given SQL Database. You will be required to make at least 1 model for each table in your Database.
To do this you will need to setup fields in your model to match each field in your database by using the attribute @Fillable. SQLibrary can also automatically build your tables for you by using an optional @Schema attribute for this example we will be using both.
import code.nextgen.sqlibrary.database.utils.Result;
import code.nextgen.sqlibrary.model.Model;
import code.nextgen.sqlibrary.model.ModelFactory;
import code.nextgen.sqlibrary.model.annotation.Fillable;
import code.nextgen.sqlibrary.model.annotation.PrimaryKey;
import code.nextgen.sqlibrary.model.annotation.Schema;
import code.nextgen.sqlibrary.model.annotation.UniqueKey;
import code.nextgen.sqlibrary.model.common.UUIDFormat;
public class PlayerModel extends Model {
@PrimaryKey(name = "pk_player") //Add Primary Key Constraint with name "pk_player"
@Fillable(column = "player_id", sortingIndex = 1) //Specify Column Name and Sorting Index
@Schema(attributes = "INT NOT NULL AUTO_INCREMENT") //Specify Schema Attributes
public Integer playerID;
@UniqueKey(name = "uk_player_uuid") //Add a Unique Key constraint
@Fillable(column = "player_uuid", sortingIndex = 2, formatField = UUIDFormat.class) //Specify a Field format to Automatically parse between UUID and VARCHAR types
@Schema(attributes = "VARCHAR(50) NOT NULL")
public UUID playerUUID;
Highlights
From source dataLoaders
Runs on Spigot and Paper.
Footprint
Rated a light load on a server.
Last update
Its author last shipped an update 11 yr ago.
SQLibrary for Spigot on Nxeon
From our catalogue- One-click install
- Supported on Nxeon Minecraft servers, for Paper servers. We download it from SpigotMC, place it, and restart the server.
- Server side
- Required on the server
- Server type needed
- Spigot, Paper
- Server load
- light
- Smallest plan we suggest
- Minecraft — 1.5 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
- Latest build
- SNAPSHOT-1.1.0, released 2016-01-29
Game versions by loader
| Loader | Game versions | Newest |
|---|---|---|
| Paper | ||
| Spigot |
From 1 recorded build of SQLibrary for Spigot.
Run SQLibrary for Spigot on a Minecraft server
Pick a server or deploy a new one above; it is installed in one click.
What kind of mod it is
From the catalogAdmin & protection
Permissions, moderation, anti-cheat and land protection for the people running the server.
Runs on your server
From source side supportSpigotMC lists SQLibrary for Spigot as required on the server. Check its SpigotMC page to see whether players need it too.
Compatibility
- Game
- Minecraft
- Loaders
- SpigotPaper
- Runs on
- Serverrequired on the server
- Requires
- One-click install needs a Paper server.
Verified at the source
- ✓SpigotMCOfficial listing, checked 2026-10-16Open ↗
- ✓AuthorSlipsWhitley, as published on SpigotMC
- ✓LicenseNot published by the sourceFree
SQLibrary for Spigot, answered
Generated from the mod’s own source data.
Do my players need to install SQLibrary for Spigot?
SpigotMC lists SQLibrary for Spigot as required on the server. Check its SpigotMC page to see whether players need it too.
Which loaders does it support?
Spigot and Paper.
Is it free?
Yes. SQLibrary for Spigot is free to download from SpigotMC.
How do I add it to my Nxeon server?
Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

Run SQLibrary for Spigot on a Minecraft server.
Deploy in about a minute from $4.20 a month, then add SQLibrary for Spigot in one click.









