HyDB
HyDB provides a professional SQLite database API for Hytale plugins. Features async operations, per-world & global databases, schema migrations, transactions, and admin debug commands. Simple API - install once, all plugins benefit.
About HyDB
HyDB - Professional SQLite Database API for Hytale
š Overview
HyDB is a professional base plugin for Hytale that provides a comprehensive SQLite database API for persistent data storage. It allows other plugins to easily store and retrieve data without managing database connections themselves.
Think of it as a database service layer - install HyDB once, and all your other plugins can use it for reliable, fast, thread-safe data storage.
⨠Key Features
šļø Database Management
SQLite with JDBC - Industry-standard embedded database (no external server needed)
Per-World & Global Databases - Store data globally across all worlds or per-world
Automatic Connection Management - HyDB handles all database lifecycle
File-Based Storage - Each plugin gets its own database file for complete isolation
ā” Performance & Safety
Async Operations - Non-blocking database calls using Java 25 virtual threads
Thread-Safe - Safe concurrent access from multiple plugins/threads
Connection Pooling - Efficient resource management
WAL Mode - Write-Ahead Logging for better performance
š§ Complete API
Full CRUD Operations - Create, Read, Update, Delete with simple API
Schema Migrations - Version and upgrade database schemas automatically
Transaction Support - Execute multiple operations atomically
Blob Storage - Store binary data (images, files, serialized objects)
Query Builder - Fluent API for constructing complex SQL queries
Prepared Statements - Built-in SQL injection protection
š® In-Game Admin Commands
/hydb list - View all databases with file sizes
/hydb info <db> - Show database details and statistics
/hydb tables <db> - List all tables with row counts
/hydb query <db> "SQL" - Execute SELECT queries for debugging
Read-only queries ensure data safety
š¦ Installation
Download HyDB-1.0.0.jar
Place in your server's mods folder
Restart your server
Done! Other plugins can now use HyDB
Requirements:
Hytale Server (latest version)
Java 25+
šØāš» For Plugin Developers
Quick Start
// Get the API HyDBAPI api = HyDBPlugin.getAPI();
// Get or create a database Database db = api.getGlobalDatabase("myplugin");
// Create a table db.createTable("users", "id INTEGER PRIMARY KEY AUTOINCREMENT", "uuid TEXT NOT NULL UNIQUE", "username TEXT NOT NULL", "coins INTEGER DEFAULT 0" );
// Insert data (async) Map<String, Object> data = new HashMap<>(); data.put("uuid", player.getUniqueId().toString()); data.put("username", player.getName()); data.put("coins", 100);
db.insertAsync("users", data).thenAccept(rows -> { System.out.println("Player data saved!"); });
// Query data (async) db.queryFirstAsync("SELECT * FROM users WHERE uuid = ?", playerUUID.toString()) .thenAccept(user -> { if (user != null) { int coins = (int) user.get("coins"); // Use the data } }); Database Scope
// Global database - shared across all worlds (economy, player stats) Database global = api.getGlobalDatabase("economy");
// Per-world database - isolated per world (claims, regions) Database world = api.getWorldDatabase(world, "claims");
šÆ Use Cases
Perfect for plugins that need:
ā Economy Systems - Player balances, shops, transactions
ā Player Statistics - Stats tracking, leaderboards, achievements
ā Land Claims - Territory ownership, permissions
ā Custom Game Modes - Game state, progression tracking
ā Social Features - Friends lists, guilds, parties
ā Admin Tools - Bans, warnings, action logs
ā RPG Systems - Character data, skills, inventory
ā Any Persistent Data - Anything that needs to survive restarts
šļø Architecture
Database Structure
HyDB/ āāā global/ # Global databases ā āāā economy.db # Economy plugin ā āāā stats.db # Stats plugin ā āāā yourplugin.db # Your plugin āāā worlds/ # Per-world databases āāā world1/ ā āāā claims.db āāā world2/ āāā claims.db Each plugin gets its own database file containing multiple tables, providing:
Complete data isolation
Easy backup/restore
Independent scaling
No table name conflicts
š Documentation
Included files:
README.md - Complete API documentation with examples
COMMANDS.md - Admin command reference
QUICK_START.md - Quick reference guide
EXAMPLE_USAGE.java - Full working example plugin
DATABASE_STRUCTURE.md - Architecture details
š Safety Features
Read-Only Admin Commands - Query commands only allow SELECT/PRAGMA
SQL Injection Protection - Prepared statements throughout
Automatic Rollback - Transaction failures roll back automatically
Error Handling - Comprehensive error messages and logging
š ļø Technical Details
Language: Java 25 with modern features (virtual threads, switch expressions)
Database: SQLite 3.47.1.0 with JDBC
Build: Simple bash build script (no complex build tools)
Dependencies: Bundled (SQLite JDBC, SLF4J)
Size: ~14MB (includes all dependencies)
š Why Use HyDB?
For Server Owners
ā Install once, benefits all plugins ā Centralized database management ā In-game debugging commands ā Better server performance (shared connection pooling)
For Plugin Developers
ā No database management code needed ā Simple, intuitive API ā Async operations prevent lag ā Well-documented with examples ā Schema migration support
š Comparison
Feature HyDB JSON Files Custom DB Code
Easy to Use ā Simple API ā Very Simple ā Complex
Performance ā Fast ā Slow ā Fast
Queries ā SQL ā Limited ā SQL
Thread-Safe ā Yes ā No ā ļø Depends
Async ā Built-in ā Manual ā ļø Manual
Migrations ā Built-in ā Manual ā ļø Manual
Transactions ā Built-in ā No ā Yes
š Example Plugins Using HyDB
The download includes a complete example plugin showing:
Database setup with migrations
Player data management
Transaction-based operations
Query builder usage
Best practices
š License
Open source - free to use for Hytale servers and plugin development.
š¤ Support & Contributing
Issues: Report bugs or request features
Documentation: Comprehensive guides included
Examples: Working code samples provided
š Get Started Today!
Install HyDB on your server
Other plugins can immediately use the API
Use /hydb commands for debugging and monitoring
Enjoy reliable, fast database storage!
Version: 1.0.0 Compatibility: Hytale (current version) Mod Author: Oceride
Making data persistence simple and powerful for Hytale plugins! This is a required dependency / backend database mod.
Image Generated by GPT-4
Categories
Frequently Asked Questions
What is HyDB?
HyDB provides a professional SQLite database API for Hytale plugins. Features async operations, per-world & global databases, schema migrations, transactions, and admin debug commands. Simple API - install once, all plugins benefit.
How do I download HyDB?
You can download HyDB for free from CurseForge. Click the "Download on CurseForge" button on this page to go directly to the download page.
Who created HyDB?
HyDB was created by oceride. The mod has been downloaded 297 times.
Is HyDB compatible with Hytale servers?
HyDB is designed for Hytale and can be used on both single-player and multiplayer servers. Check the mod page on CurseForge for specific compatibility information.
How do I install HyDB?
To install HyDB: 1) Download the mod from CurseForge, 2) Place the file in your Hytale mods folder, 3) Restart the game. The mod should load automatically.
Related Misc Mods
View all modsYmmersive Melodies
Conczin
Upload and play MIDI files in-game on various instruments to annoy your friends with custom melodies!
MultipleHUD
Buuz135
A simple mod that allows you to have multiple HUDs present at once.
Spanish Translation
Plexu5
A Spanish language translation for Hytale. Includes UI, items, and menus.
YUNG's HyDungeons
YUNGNICKYOUNG
Adds new procedurally generated dungeon instances!
Just Enough Tales (JEI mod)
uwudwagon
A JEI mod for Hytale.
[NoCube's] Simple Bags
NoCube
Adds bags that you can put anything in!