OfflineCommands 2.0.0-SNAPSHOT: A Major Update with New Features and Improvements
About the 2.0.0-SNAPSHOT Hello there! This project has been out of my sight for a while, and I decided to spice it up a bit! If you face any issues, please notify me. This project utilizes many new methods and features that I am still getting the hang of, and they are awesome!
What's changed?
User data serialization Users are now stored in user_data.yml and includes Objects that are serialized into a yaml format.
Command list User data contains a list of commands, their username, and each command contains a permission that if executed, requires that player to have that permission, a message that will send to the player on execution, if successful.
Sound effect A sound that is played whenever the command is executed.
Executor and command value Only required inputs are executor, identifier, and command value. Here is an example of a user being stored:
Enhanced performance: We have optimized the plugin code to make it run faster and smoother, saving you memory and CPU resources.
Better feedback: We have improved the feedback messages to give you more information and guidance on how to use the plugin features.
Bug fixes: We have fixed some issues that caused the plugin to crash or behave unexpectedly when dealing with invalid UUIDs or user storage objects.
More flexibility: We have added some new parameters to the plugin commands that allow you to customize your experience. You can now use the page parameter to paginate the list of stored commands, and the feedback parameter to control whether you want to receive feedback messages or not.
Improved reliability: We have improved the reload command to handle errors gracefully and return a boolean value indicating the success of the operation.
Improved usability: We have improved the tabComplete method to provide more accurate and relevant suggestions for command arguments.
Improved help: We have improved the help command to return a formatted help message as a string that explains how to use the plugin commands.
Changelog
Use a List to store and manipulate commands
Add option to remove all commands from user (*)
Clean up code
Replace the plugin variable with offlineCommands for consistency and clarity.
Update event priority to EventPriority.LOWEST for more controlled execution.
Add detailed comments to the onJoin method, explaining its purpose and logic.
Add detailed comments to the onJoin method, explaining its purpose and logic.
Implement conditional checks for user storage existence and command execution.
Utilize the SETTINGS_PATH constant to access configuration settings.
Update config.yml to show less users per page (5 -> 2)
Register additional classes for configuration serialization using YamlConfiguration
Add variable to store user-specific data in a UserConfigData object
Implement onReload() method for config and user data reload using reloadConfig() and loadUserData()
Add onDisable() method for cleanup and unregistration using unregisterAll() main
Use separate classes (InfoCommands and ModifyCommands) to handle different types of commands
Add reload command to reload the plugin
Rename methods and variables for clarity and consistency
Change message sending logic to use configurations and variables
Add user_data.yml file to store user information
Add UserStorage.class to handle user data
Add UserStorage.class to handle user data
Add StorageUtils.class to handle user data and storage operations
Add SoundStorage.class for handling sound for commands
Add CommandStorage.class for handling command storage
Modify config.yml and plugin.yml to update the plugin configuration and metadata
docs: adding javadoc comments to explain the functionality and usage of each method
refactor: rename method color to applyChatColors
style: format and indent code according to conventions
feat: add runCommandAsPlayer method to OfflineCommandsUtils
feat: add getDataFromUsername method to OfflineCommandsUtils
feat: add getDataFromUUID method to OfflineCommandsUtils