Player Persistence Mod
警告:本模组是一个 API,需要一个正常运行的 PostgreSQL 服务器以及额外的代码才能工作!它无法独立运行!
概述:Player Persistence 模组是一个轻量级库,专为希望为玩家提供无缝、持久体验的 Minecraft 服务器开发者设计,适用于服务器重启和世界切换场景。该模组负责将玩家物品栏、末影箱内容以及位置数据自动保存和加载到数据库中,确保玩家状态得到准确保留。
主要功能:
-
针对 Docker 和 Kubernetes 部署优化:只需设置环境变量 DB_URL、DB_USER 和 DB_PASS,即可更改所使用的数据库及用户。要在不同类型的服务器之间同步坐标,请将 SERVER_NODE 变量设置为你的服务器名称。
-
物品栏持久化:自动保存和加载玩家的物品栏(包括盔甲和副手物品)到数据库中。这确保了玩家在服务器会话期间的物品一致性和安全性。
-
末影箱持久化:与物品栏持久化类似,此功能会保存和加载玩家末影箱中的物品,确保这些珍贵物品不会丢失。
-
玩家位置同步:在服务器重启或跨服务器迁移时保持精确的玩家位置和维度数据,让玩家能够从其离开的位置继续旅程。
-
PostgreSQL 数据库集成:该模组专为与 PostgreSQL 数据库配合使用而构建,非常适合需要持久数据存储的大型服务器网络或自定义服务器设置。
用法
本模组旨在作为服务器开发者的后端库,不添加任何直接的游戏玩法功能。要使用此模组,只需将其集成到服务器的模组设置中,配置数据库连接,然后让模组自动处理玩家数据的持久化。
兼容性
该模组设计用于 Fabric API,并与最新版本的 Minecraft 兼容。它还具备模块化特性,开发者可以根据特定服务器需求对其进行定制或扩展。
使用方法
- 向项目中添加依赖:
modApi("maven.modrinth:player-persistence:VERSION")?.let { include(it)} - 创建一个 PlayerPersistence 对象,例如
var pp = PlayerPersistence() - 根据需要使用方法
缺少某些功能?
如果您缺少某些功能,请在 GitHub 上提交 Issue,我们将尽力解决。
Player Persistence Mod
WARNING: This mod is an API, it requires a functioning PostgreSQL Server and additional code to function! It does not work as standalone!
Overview: The Player Persistence mod is a lightweight library designed for Minecraft server developers who want to provide a seamless, persistent experience for players across server restarts and world transitions. This mod handles the automatic saving and loading of player inventory, Ender Chest contents, and positional data to a database, ensuring that players' states are preserved accurately.
Key Features:
-
Optimized for Docker and Kubernetes Deployments: Change which DB to use with what user simply by setting the enviroment variables DB_URL DB_USER DB_PASS. To sync coordinates across multiple ServerTypes set the SERVER_NODE variable to the name of your Server.
-
Inventory Persistence: Automatically save and load player inventories, including armor and off-hand items, to a database. This ensures that player items are consistent and safe across server sessions.
-
Ender Chest Persistence: Similar to inventory persistence, this feature saves and loads the contents of players' Ender Chests, making sure that these valuable items are not lost.
-
Player Position Syncing: Maintain the exact player position and dimension data across server restarts or even cross-server transitions, allowing players to continue their journey exactly where they left off.
-
PostgreSQL Database Integration: The mod is built to work with PostgreSQL databases, making it ideal for large server networks or custom server setups that require persistent data storage.
Usage
This mod is intended as a backend library for server developers and does not add any direct gameplay features. To use the mod, simply integrate it into your server's mod setup, configure the database connection, and let the mod handle player data persistence automatically.
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 customized or extended by developers to fit specific server needs.
How-To-Use
- Add the dependency to your project:
modApi("maven.modrinth:player-persistence:VERSION")?.let { include(it)} - Create a PlayerPersistence Object e.g
var pp = PlayerPersistence() - Use the methods as needed
Missing something?
If you're missing some feature please open a issue on GitHub and we'll see to it.
下载 Player Persistence
下载 Player Persistence
下载 Player Persistence
下载 Player Persistence
下载 Player Persistence
下载 Player Persistence
下载 Player Persistence
下载 Player Persistence
下载 Player Persistence
下载 Player Persistence
BREAKING: 更改了序列化/反序列化逻辑 终于支持 Polymer 和原版组件。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧