The
SharedInventoryPlugin is designed to automatically synchronize players' inventories between sessions on a Minecraft server and save additional aspects of their state. Here's a breakdown of its features:
Inventory Synchronization
When a player leaves the server, their complete inventory is saved in a database. When they rejoin, the plugin restores their inventory exactly as it was before they left.
Synchronization of Other Attributes
In addition to the inventory, the plugin also allows saving and restoring the following player state aspects, which can be configured:
- Experience (xp): Saves and restores the player’s experience points.
- Health (health): Maintains the player's health as it was.
- Hunger Level (food): Saves and restores the food level.
- Economy (economy): If used with the Vault plugin, it allows synchronizing the player’s balance.
- Ender Chest (enderchest): Saves the contents of the player’s Ender Chest.
- Game Mode (gamemode): Restores the player’s game mode (e.g., survival or creative).
- Potion Effects (effects): Keeps the potion effects the player had.
- Offhand (offhand): Saves the item in the player’s offhand.
Configurable Messages and Sounds
You can customize the messages players receive when their inventory is saved or restored, and set sounds to indicate success or failure in synchronization.
What Is It For?
The plugin is useful for servers where a persistent gameplay experience is needed. For example:
- In RPG servers where players want to resume their state exactly as they left it.
- In minigames or survival servers that require complete synchronization of inventory and other player attributes.
- In server networks where the inventory and progress of players must remain consistent.
This plugin allows players to continue their game without losing any progress.
# MySQL Database
database:
host: "localhost"
name: "your_database"
user: "your_user"
password: "your_password"
port: 3306
messages:
plugin_startup_message: "The plugin has started successfully."
database_connection_success: "Connected to MySQL database."
database_connection_failed: "Failed to connect to MySQL database."
player_quit_message: "Inventory synchronized on logout."
inventory_sync_success: "Inventory synchronized on login."
inventory_sync_error: "Error synchronizing inventory."
sounds:
sync_success: "ENTITY_PLAYER_LEVELUP"
sync_error: "ENTITY_VILLAGER_NO"
save_options:
save_xp: true
save_achievements: true
save_health: true
save_food: true
save_economy: true
save_enderchest: true