Releases: Jochyoua/OfflineCommands
3.0.0
OfflineCommands
Changelog
Main 3.0.0 release changes MORE INFO
- Added pagination with config options of how many users listed
- Reformated code for efficiency and readability
- Added the options to add recurring commands
- Changed config.yml for readability and new fields
Added more robust storage options MORE INFO
- Added sqlite support instead of yaml storage handling
- Updated config files and Storage classes to reflect these changes
Add debugging method MORE INFO
- Added path to config.yml to disable file storage
- Only warnings are logged to console using this method
Add info command MORE INFO
- Changed plugin.yml to reflect changes
- Modified InfoCommands.java to reflect changes
About the 3.0.0
Hello once again fellow travelers. It's about that time for a new update! I've been busy with life and working, so this project has once again been on the back burner. It's time to change that.
What's changed?
Optimizations and additions
- Added info command
- Added metrics
- Added sqlite storage
- Optimized code and made code more readable
Full Changelog: 2.0.0-SNAPSHOT...3.00
2.0.0-SNAPSHOT
OfflineCommands
Changelog
Refactor CommandStorage handling and formatting MORE INFO
- Use a List to store and manipulate commands
- Add option to remove all commands from user (*)
- Clean up code
Refactor PlayerConnectionListener for improved user management MORE INFO
- 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)
enhancement: Update OfflineCommands plugin functionality MORE INFO
- 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
Refactor OfflineCommandExecutor.java MORE INFO
- 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 and storage classes MORE INFO
- 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
refactor: improve OfflineCommandUtils methods MORE INFO
- 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
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?
Commands, and command handling!
- 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 thefeedback
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.
Configurations and data storage
- 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:
users:
- ==: io.github.jochyoua.offlinecommands.storage.UserStorage
uuid: 49b23ff7-9202-47c6-97aa-e631bf4284d4
commands:
- identifier: 3e18335a
soundStorage:
==: io.github.jochyoua.offlinecommands.storage.SoundStorage
volume: 1.0
sound: BLOCK_ANVIL_BREAK
pitch: 1.0
commandValue: test
requiredPermission: offlinecommand.requires-this-permission
executor: CONSOLE
message: You just ran the command &c/test!
username: Jochyoua
Full Changelog: 1.0.1-SNAPSHOT...2.0.0-SNAPSHOT
1.0.1-SNAPSHOT
OfflineCommands
Changelog
Added
- Tab completion for all commands
- Implement an optional buffer between joining and command execution
- Add support for escaping quotes - Thank you @Phoenix616!
- Added some debug messages
Fixed
- Fixed issue with checking if String is empty
- Fixed bug where UUID would be used for both identifier and UUID in identifier-search
- Removed some redundant code
What's Changed
- Add support for escaping quotes by @Phoenix616 in #1
New Contributors
- @Phoenix616 made their first contribution in #1
Full Changelog: 1.0.0-SNAPSHOT...1.0.1-SNAPSHOT
1.0.0-SNAPSHOT
This is the initial release, so here is the README.md
OfflineCommands
OfflineCommands is a plugin built to run commands for specific players when they connect.
This plugin can also run the command if they're online as well.
All contributions are very much appreciated!
Commands
OfflineCommands has basic commands for you to use.
All commands below require the permission offlinecommands.use
Command | Description |
---|---|
offlinecommands list |
Lists all current users and their commands |
offlinecommands help |
Show all available commands |
offlinecommands add |
Adds a command for the specified player |
offlinecommands remove |
Removes a command from a user |
Command examples
- Adding
offlinecommands add user="USERNAME/UUID" command="COMMAND"
offlinecommands add user="USERNAME/UUID" command="COMMAND" executor="player" no-feedback
no-feedback makes it so that the sender does not recieve any mesages
executor="player" is optional and if it is anything other than CONSOLE it executes it as a player
- Removing
offlinecommands remove 069a79f4-44e9-4726-a5be-fca90e38aaf5 73e389a5
This guide finishes here, thank you for reading!