Skip to content
Powrót do bloga

SimplixStorage: Better Data Storage for Minecraft Servers

ice
ice
@ice
Updated
53 wyświetleń
TL;DR:SimplixStorage is a standalone Java library for storing Minecraft server data in JSON, YAML, or TOML formats without depending on Bukkit. And it provides Bukkit-like syntax with better independence for plugin developers and server admins.
🐙 Open-source Minecraft project

KotlinFactory/SimplixStorage

Library to store data in a better way

⭐ 138 stars💻 Java📜 Apache-2.0
View on GitHub ↗

Need to store Minecraft server data without being locked into Bukkit or BungeeCord? SimplixStorage is a Java library that handles configs and player data in JSON, YAML, or TOML independently. It's fast, supports nested objects, and gives you full control over your server's data layer.

What SimplixStorage Does

SimplixStorage is a Java library built specifically for storing data in Minecraft server environments. Here's the key distinction: it's not Bukkit, and it doesn't require Bukkit to work. Instead, it provides a familiar data storage interface that borrows from Bukkit's syntax but runs completely independently.

Most server admins and developers know Bukkit's configuration system. You call methods like getConfig().set("key", value) and the data persists in a YAML file. SimplixStorage does the same thing, except the storage layer is completely decoupled from the Bukkit framework. That matters if you're building plugins that need to work across multiple server types, or if you're developing something that can't depend on Bukkit being installed at all.

The library supports three file formats, each with different trade-offs. JSON is the fastest and most compact format, which becomes important when you're storing hundreds or thousands of player profiles. YAML is more human-readable and makes sense for configuration files where someone might edit values directly. TOML offers a middle ground - it's faster than YAML but more readable than raw JSON. You pick the format based on your use case, and the library handles all the parsing internally.

One interesting detail: SimplixStorage actually supports nested objects cleanly, which some lightweight config loaders struggle with. If you're tracking player stats with multiple nested sections (inventory data, progress tracking, custom metadata), the library handles that structure naturally.


Why Server Admins Use It

Server administration is full of little problems that add up. You're running multiple plugins, each with its own config system. You need to store player data somewhere. Most players want it to survive server restarts and plugin updates. Folks who try this don't want to set up a database just for some simple key-value data.

SimplixStorage solves these problems directly by providing a clean, standalone storage layer. Plugin developers use it because they can distribute plugins that don't require Bukkit. Server admins use it because they need better control over where their data lives and how it's organized.

Let me be concrete: imagine you're running a server where you need to track custom player data beyond what Bukkit natively provides. Maybe you're logging voting patterns, tracking PvP statistics, or storing information about custom game modes. You could dump this into Bukkit's config system, but that ties your data to Bukkit's whole framework. SimplixStorage lets you store that data independently, in whatever format makes sense for your infrastructure.

If you're setting up a fresh server infrastructure with our Server Properties Generator to handle the basics, SimplixStorage extends that foundation by giving you a way to store anything custom you need. Player inventories, economy data, clan structures - whatever your plugins need to persist. And if you're tracking voting data locally, you could even test the submission process with our Votifier Tester before going to production.

The performance aspect is also real. If you're loading player data on server start or when players join, the speed difference between JSON parsing and some other formats can add up. SimplixStorage's implementation is efficient enough that you notice it with moderate-sized datasets.


Getting Started: Installation and Setup

Setting up SimplixStorage in your project takes about five minutes if you're already using Maven. If you're not using Maven, you'll need to set it up first - but that's beyond the scope here.

Add the JitPack repository to your pom.xml:

xml
<repository>
 <id>jitpack.io</id>
 <url>https://jitpack.io</url>
</repository>

Then add the SimplixStorage dependency:

xml
<dependency>
 <groupId>com.github.simplix-softworks</groupId>
 <artifactId>SimplixStorage</artifactId>
 <version>3.2.7</version>
</dependency>

You'll need to decide: should you shade SimplixStorage into your plugin, or mark it as provided? If you're the only developer who'll use this library, shading it into your plugin makes sense - it's simpler to distribute and you avoid version conflicts with other plugins. If you're building a library that other plugins depend on, leaving it as provided lets those plugins use the shared version.

Once Maven pulls the dependency, you're ready to start using it in your code. The API is genuinely straightforward if you've worked with Bukkit configs before.


Key Features Worth Understanding

Nested Objects and Complex Data Structures

This is SimplixStorage's strongest feature. Most lightweight config libraries flatten data into a single level or require a lot of boilerplate to handle nested structures. SimplixStorage treats nested objects as a first-class feature.

Let's say you're storing player progression data. You might have a structure like: player name → level → different skill categories → individual skill levels. SimplixStorage handles that naturally. You can nest objects as deep as you need, and the library preserves the structure when writing to and reading from files.

Multiple Format Support

SimplixStorage's three-format support is genuinely useful. You create a Storage instance, point it at a file, and the library figures out the format from the file extension. Want to convert from JSON to YAML? Rename the file, restart, and done. No conversion scripts, no format-specific parsing code.

This flexibility also means you can choose the right format for each use case. Configuration files can stay as YAML for readability. Player data files can be JSON for speed. Honestly, less common data can be TOML if you prefer it.

Bukkit-Compatible API

If you've used Bukkit's FileConfiguration class, the transition is almost zero. Methods like get(), set(), contains(), getKeys() - they all work the same way. This similarity reduces the learning curve and makes switching from Bukkit's config system straightforward.

Standalone Independence

SimplixStorage doesn't require Bukkit or any Minecraft server software to run. You could theoretically use this library in a non-Minecraft Java application if you needed a lightweight file-based config system. That flexibility is useful for developers building tools that might run in different environments.

Open Source with Clean Licensing

The library is released under the Apache-2.0 license. That means you can use it in private projects, commercial plugins, or completely closed-source applications without any license headaches. The codebase sits on GitHub with 138 stars - not huge, but a reasonable number of users who've found it useful.


Gotchas and How to Avoid Them

Null Handling

SimplixStorage doesn't make assumptions about your data. If you call get() on a key that doesn't exist, it returns null. This is standard behavior, but it means you need to check for null values before assuming data exists. Use contains() first if you're unsure whether a key exists.

File Permissions

SimplixStorage writes directly to the filesystem. Your server process needs write access to the directory where you store files. On Linux production servers, this often means ensuring the user running your server (usually www-data or a similar dedicated user) owns the data directories. If you see "permission denied" errors, check ownership before blaming the library.

Format Consistency

If you create a file as JSON but accidentally reference it with a.yaml extension later, the parser will fail. Format mismatches cause parsing errors, not silent failures. Keep your format naming consistent, or build format migration logic if you need to switch between formats.

Memory Usage with Large Datasets

SimplixStorage loads the entire file into memory when you read it. If you're storing thousands of player profiles with lots of nested data, that uses RAM. It's not a dealbreaker - most servers have plenty of RAM - but be aware of this constraint before you decide SimplixStorage is the right fit for extremely large datasets.


Worth It Or Not

SimplixStorage is genuinely useful if you need file-based data storage with Bukkit-like syntax and zero framework dependencies. If you're writing a small plugin that needs to persist player data or configuration, it's a solid choice that works out of the box.

Where it falls short: if you need complex queries across millions of records, or if your data needs to live on multiple servers simultaneously, you need an actual database. SQLite, MySQL, PostgreSQL - those handle scenarios SimplixStorage simply isn't designed for.

For straightforward use cases - player data, server configurations, custom game state, voting records - SimplixStorage is useful. The project is actively maintained (latest version 3.2.7), the Apache-2.0 license is clean, and if you need to debug something or extend functionality, the Java codebase is readable.

Try it. Worst case: you spend an hour integrating it and realize your use case needs something different. Best case: you save yourself hours of writing custom serialization code and dealing with config file parsing bugs.

Frequently Asked Questions

What's the difference between SimplixStorage and Bukkit's default config system?
Bukkit's config system is tightly integrated with the Bukkit framework. SimplixStorage is standalone—you don't need Bukkit installed to use it. It provides the same Bukkit-like methods but works independently, making it ideal for cross-platform compatibility or plugin developers who want to avoid Bukkit dependencies.
Can I use SimplixStorage in a compiled plugin without adding it as a dependency?
Yes, if you shade it into your plugin JAR during the build process using Maven's shade plugin. This bundles SimplixStorage directly into your plugin file. Alternatively, you can mark it as a soft dependency if other plugins on the server provide it, but shading is the most reliable approach for distribution.
Is SimplixStorage faster than SQLite for server data?
For typical use cases like player data, SimplixStorage (especially JSON format) is faster for reads because it loads files directly without SQL query parsing overhead. SQLite is better if you need complex queries across millions of records or data shared across multiple servers. For single-server setups with moderate data, SimplixStorage usually wins.
Does SimplixStorage support encrypted storage?
Not natively. SimplixStorage stores files as plain JSON, YAML, or TOML. You'd need to implement encryption separately, either by encrypting files before writing or using a custom wrapper around the library's methods. This simplicity is intentional—the library keeps the storage layer straightforward.
What Minecraft server versions does SimplixStorage work with?
SimplixStorage works with any Java version that runs Minecraft servers (Java 8 and newer). It's not tied to specific Minecraft versions since it's a standalone library. As long as your server runs Java, SimplixStorage will work, whether you're using an old Bukkit version or a modern Spigot/Paper server.