Storage System Overview
The storage system is implemented through:- Multiple numbered storage inventories per clan (configurable maximum)
- Permission-based access control
- Persistent storage across server restarts
- Integration with clan upgrade system
Enabling Storage
Clan storage must be enabled inconfig.yml:
If storage is disabled, players will receive the “Feature disabled” message when attempting to access storage.
Accessing Storage
For Players
Open clan storage through the GUI menu:Players must have the
OPENSTORAGE clan permission to access storage. By default, this is set to MEMBER rank.For Administrators
Admins can open any clan’s storage:Storage Management
Multiple Storage Slots
Each clan can have multiple storage inventories:- Numbered from 1 to the clan’s maximum storage limit
- Maximum limit starts at the default value (configured in
max-storage-default) - Can be increased through the upgrade system
Storage Inventory Interface
FromClanManager.java:176-215, the storage system:
- Validates access - Checks if storage is enabled and player has permission
- Checks storage number - Ensures the requested storage is within the clan’s limit
- Creates inventory - Automatically creates storage if it doesn’t exist
- Opens GUI - Displays the storage inventory to the player
Access Controls
Permission System
Storage access is controlled by theOPENSTORAGE subject permission:
Default Configuration:
If
permission.default.forced is enabled in config.yml, clan leaders cannot customize permissions.Locked Storage Slots
Storage slots beyond a clan’s maximum are locked:- Attempting to open a locked slot shows a “Storage locked” message
- The storage number is validated against
clanData.getMaxStorage() - Clans must upgrade their max storage to unlock additional slots
ClanManager.java:187-190):
Storage Data Structure
FromIClanData.java:90-96, storage is managed as:
Persistence
Storage inventories are:- Saved when the inventory is closed (
CloseInventoryEvent) - Stored in the clan database (YAML, H2, or MySQL)
- Automatically loaded when accessed
- Preserved during server restarts
Version 2.8 fixed a critical dupe bug by adding close inventory event handling to save clan database.
Upgrading Storage
Clans can increase their maximum storage capacity through the upgrade system:Upgrade Process
Purchase upgrade
Pay the required cost (configured in
upgrade.yml):- Cost can be in WarPoints, Vault currency, or PlayerPoints
- Each level increases max storage by a configured amount
Messages configuration):
Storage Configuration
config.yml Settings
upgrade.yml Settings
The max-inventory value in config.yml sets the absolute maximum. Clans cannot upgrade beyond this limit regardless of how the upgrade.yml is configured.
Storage Best Practices
Organization
- Designate storage purposes - Use different storage numbers for different item types
- Set clear rules - Establish clan rules about what can be stored
- Regular maintenance - Periodically clean out unused items
- Trust management - Adjust permissions based on member trustworthiness
Security
- Restrict access for new members - Consider raising OPENSTORAGE requirement to MANAGER for valuable items
- Use multiple storages - Keep valuable items in higher-numbered storages that are less frequently accessed
- Monitor activity - Check who has access and when storage is opened
Performance
- Avoid overfilling - Large inventories can cause lag when opened
- Use appropriate database - MySQL or H2 recommended for large servers
- Regular backups - Use
/clansplusadmin backupto backup clan data including storage
Storage contents are included in clan database backups. Regularly backup your server to prevent item loss.
Common Issues
”Feature Disabled” Message
If players see this when trying to access storage:- Check
storage-settings.enabledinconfig.yml - Reload the plugin:
/clansplusadmin reload - Verify the player has
OPENSTORAGEpermission in their clan
”Storage Locked” Message
This appears when:- The storage number exceeds the clan’s
maxStoragevalue - The clan needs to purchase storage upgrades
- The storage number is invalid (less than 1)
“Storage Number Exceeds Limit” Message
This occurs when:- The requested storage number is higher than
max-inventoryin config.yml - The system maximum has been reached
- Solution: Increase
max-inventoryor use lower storage numbers
