Inventory
SporeCore has a feature called Inventories. This system allows staff members to restore player inventories in situations such as:
Player death
Player logout
Player joining the server
Enabling or disabling a mode
If something goes wrong, a staff member can refund a player by restoring a previously saved inventory.
⚙️ Configuration
You can configure the inventory system in config.yml. Here, you control how long inventories are stored, when they are saved, and what happens after they are restored.
inventories:
deletion: 7d
deleteAfterRestore: true
storeReasons:
death: true
join: true
leave: true🔹 Explanation of Settings
deletion: How long inventories are kept before being automatically deleted.
Example:
7d= 7 days
deleteAfterRestore:
If true, the inventory will be deleted once it has been restored.
If false, the inventory remains stored even after restoration.
storeReasons: Determines when inventories should be saved.
death: Save inventory on player death.
join: Save inventory when a player joins the server.
leave: Save inventory when a player leaves the server.
🛠️ Restoring Inventories
To restore a player’s inventory, use:
When restoring an inventory, you have two options:
🔹 Force Restore
The player’s current inventory is immediately overridden.
The restored inventory is applied instantly.
🔹 Soft Restore
The inventory is stored as pending.
The player can claim it later using:
This allows players to choose when they want to restore their inventory.
🧹 Inventory Management
🔹 Clearing Stored Inventories
You can manually clean up stored inventories using:
player: Clears all stored inventories for a specific player.
all: Clears all stored inventories for all players, including offline players.
🔹 Removing a Specific Inventory
To remove a single stored inventory:
id is the inventory ID you want to remove.
To find inventory IDs:
Run:
Scroll to the bottom to see the player’s pending inventories.
Click [click to view] to see all stored inventories.
Click the delete button to remove an inventory so it can no longer be claimed.
🔔 Discord Integration
You can receive Discord notifications when inventories are restored or claimed. This does not require the Discord bot feature to be enabled.
All you need to do is add a webhook URL in the Discord config. You can also configure a ping.
rollback: Discord webhook URL.
rollbackPing: Role or user to ping. Leave empty if you don’t want a ping.
🔹 Discord Notifications Include
Each notification is sent as an embed and contains:
Rollback issuer – The staff member who restored the inventory
Player – The player who received the refund
Claimed – Whether the inventory has been claimed or not
🔹 Notification Scenarios
A staff member performs a soft restore, and the player has not claimed the inventory yet.
A staff member performs a force restore.
A staff member performs a soft restore, and the player claims the inventory later.
Last updated