Download Player Persistence — Minecraft Mods — MetaMods

Player Persistence

Active

Downloads

0

Last update

4 months ago

Versions

1.21.1 — 1.21.5
Server
Fabric
Quilt
Libraries

Player Persistence Mod

IMPORTANT: This mod is an API library! For its operation, a functioning PostgreSQL server and additional programming are required! Does not work as a standalone addon!

Player Persistence is a compact library for Minecraft server developers that provides the ability to create seamless gameplay with player state preservation between server restarts and world changes. The mod automatically saves and loads player inventories, ender chest contents, and positional data to a database, ensuring accurate preservation of game state.

Key Features:

Optimization for Docker and Kubernetes: Simplified database connection configuration through environment variables _DB_URL, _DB_USER, _DB_PASS. For coordinate synchronization between servers of different types, set the _SERVER_NODE variable with your server's name.

Inventory Preservation: Automatic saving and restoration of player inventory contents, including armor and off-hand items. This ensures item integrity and safety when switching game sessions.

Ender Chest Preservation: Similar to inventories, this function saves and loads ender chest contents, preventing the loss of player's valuable items.

Position Synchronization: Maintenance of precise player coordinates and dimension data between server restarts and even when transitioning between different servers. Players continue gameplay exactly from where they left off.

PostgreSQL Integration: The mod is designed to work with PostgreSQL databases, making it an ideal solution for large server networks and custom setups requiring persistent data storage.

Usage

This mod is intended for use as a base library by server developers and does not add direct gameplay features. To use the mod, simply integrate it into your server settings, configure the database connection, and allow the system to automatically handle game data preservation.

Compatibility

The mod is designed to work with Fabric API and is compatible with the latest version of Minecraft. It is also modular and can be configured or extended by developers for specific server requirements.

How to Use

  • Add the dependency to your project:

    modApi("maven.modrinth:player-persistence:VERSION")?.let { include(it)}
  • Create a PlayerPersistence object, for example:

    var pp = PlayerPersistence()
  • Use methods as needed

Missing Features?

If you are missing any functionality, create an issue on GitHub, and we will consider the possibility of adding it.

Project members
Bims

Bims

Developer

caesarakalaeii

caesarakalaeii

Developer

Created: 6 Sep 2024

ID: 58678