CraftersStaff v7.5.0 - GameMode Persistence & Staff Chat Improvements
New Features
GameMode Persistence System
- The plugin now saves the player's GameMode before activating Staff Mode
- Restores the original GameMode when deactivating Staff Mode (Creative, Adventure, etc.) instead of forcing Survival
- If the player was in Creative, they will return to Creative
- If no previous data exists (first time), defaults to Survival for safety
- Intelligent state management for better user experience
Staff Chat Prefix System
- Fixed prefix issues in Staff Chat
- Added support for {rank_prefix} placeholder that retrieves the player's rank prefix from Vault
- Chat format now respects the configuration in message_es.yml
- To display rank in chat, use {rank_prefix} in the format configuration
- Full LuckPerms/Vault integration for rank display
Bug Fixes
Inventory Messages Removed
- Eliminated "Inventory saved" and "Inventory restored" messages when toggling staff mode
- Cleaner and less spammy user experience
- Staff mode toggle is now more seamless
Staff Chat Format Fixed
- Corrected prefix display issues in Staff Chat
- Proper placeholder replacement for rank prefixes
- Chat format configuration now works as expected
- Support for custom formats with multiple placeholders
Code Cleanup & Optimization
Configuration System Cleanup
- Removed obsolete messages.yml file
- Plugin now exclusively uses the lang/ folder structure
- message_es.yml and message_en.yml for multi-language support
- Cleaner configuration management
General Logic Verification
- Reviewed entire codebase for potential errors
- Improved error handling in critical sections
- Better state management for player data
Build Optimization
- Generated optimized CraftersStaff-v7.5.0.jar
- Uses Libby to download heavy dependencies (SQLite) at runtime
- Reduced JAR file size significantly
- Faster server startup times
Technical Details
GameMode State Management
- Stores original GameMode in database before Staff Mode activation
- HashMap cache for quick access during session
- Automatic cleanup when player disconnects
- Fallback to Survival if no saved state exists
Placeholder System
- New {rank_prefix} placeholder for Vault integration
- Compatible with existing {player}, {message}, etc.
- Supports color codes and formatting
- Works with LuckPerms and other permission plugins
Language System
- Dual language support (Spanish and English)
- Easy to add more languages by creating new YAML files
- Automatic language detection based on configuration
- All messages centralized in language files
⚙️ Configuration Updates
Staff Chat Format Example
staff-chat:
format: "&8[&6StaffChat&8] {rank_prefix}&r{player}&7: &f{message}"
This will display:
[StaffChat] [Admin] PlayerName: Hello staff!
GameMode Persistence
No configuration needed - works automatically!
- Automatically saves GameMode on Staff Mode activation
- Automatically restores on Staff Mode deactivation
- Stored in database for persistence across restarts
Installation
File: CraftersStaff-v7.5.0.jar
Simply replace the old JAR file with the new one and restart your server. Configuration will auto-update if needed.
✅ Changes Summary
Added:
- GameMode persistence system
- {rank_prefix} placeholder support
- Better state management
Fixed:
- GameMode always resetting to Survival
- Staff Chat prefix display issues
- Inventory spam messages
Removed:
- Obsolete messages.yml file
- "Inventory saved/restored" messages
Optimized:
- JAR file size with Libby
- Configuration system
- Code structure and error handling
Version: 7.5.0
Compatibility: Minecraft 1.21+ (Paper/Spigot)
File Size: Optimized
Dependencies: Vault (optional), LuckPerms (optional)