feat: add selectcrate opening type - #21
Merged
Merged
Conversation
Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com>
Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com>
Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com>
Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com>
Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com>
Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com>
Added 'final' modifiers to method parameters and local variables in SelectCrateListener and SelectCrate for improved code clarity and immutability. Minor formatting and code style improvements were also made for consistency.
Updated the 'clean' task in build.gradle.kts to remove the 'jars' directory during project cleanup.
Added documentation links and updated comments in bukkit.yml and spigot.yml. Updated paper-global.yml and paper-world-defaults.yml with new configuration options, including anticheat, management server, and entity behavior settings. Refreshed server.properties with new management server and status options, and synchronized config files with latest PaperMC documentation and features.
Updated WarCrateListener to use 'final' for local variables in event handler methods, improving code clarity and enforcing immutability where possible.
Introduced info-level logging throughout the SelectCrateListener to provide better visibility into inventory interactions, including non-player clicks, invalid inventory holders, crate state checks, and prize selection. This will help with debugging and monitoring crate selection events.
Replaced direct logger calls with the plugin's debug method in SelectCrateListener for consistency and improved logging control. Also added an overloaded debug method in CrazyCrates for simplified info-level logging.
Replaces direct prize awarding and event firing with a new PrizeManager.givePrizeAndCallEvent method across crate types and listeners. This centralizes the logic for awarding prizes and firing related events, improving maintainability and reducing code duplication. Also updates method signatures for consistency and adds final modifiers for parameters in several classes.
Eliminated the code that sent success messages to players after selecting a crate prize. This streamlines the crate selection process and prevents duplicate or unnecessary messaging.
Removed unnecessary blank lines and redundant comments to improve readability and maintain consistency in the SelectCrateExample.yml configuration file. No functional changes were made.
Standardized spacing in debug log messages for better readability and removed unused imports from SelectCrateListener.java.
* Initial plan * Initial analysis complete - Planning SelectCrate implementation Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com> * Add SelectCrate implementation - core functionality complete Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com> * Add SelectCrate documentation and fix constructor issues Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com> * Fix critical key consumption bug and improve code quality Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com> * Convert all text to English for consistency Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com> * Add implementation summary documentation Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com> * Add final modifiers and minor refactoring for clarity Added 'final' modifiers to method parameters and local variables in SelectCrateListener and SelectCrate for improved code clarity and immutability. Minor formatting and code style improvements were also made for consistency. * Clean task now deletes jars directory Updated the 'clean' task in build.gradle.kts to remove the 'jars' directory during project cleanup. * Update Paper config files with new options and docs Added documentation links and updated comments in bukkit.yml and spigot.yml. Updated paper-global.yml and paper-world-defaults.yml with new configuration options, including anticheat, management server, and entity behavior settings. Refreshed server.properties with new management server and status options, and synchronized config files with latest PaperMC documentation and features. * Add final modifiers to local variables in WarCrateListener Updated WarCrateListener to use 'final' for local variables in event handler methods, improving code clarity and enforcing immutability where possible. * Add debug logging to SelectCrateListener Introduced info-level logging throughout the SelectCrateListener to provide better visibility into inventory interactions, including non-player clicks, invalid inventory holders, crate state checks, and prize selection. This will help with debugging and monitoring crate selection events. * Refactor logging to use debug method in SelectCrateListener Replaced direct logger calls with the plugin's debug method in SelectCrateListener for consistency and improved logging control. Also added an overloaded debug method in CrazyCrates for simplified info-level logging. * Refactor prize awarding to centralize event firing Replaces direct prize awarding and event firing with a new PrizeManager.givePrizeAndCallEvent method across crate types and listeners. This centralizes the logic for awarding prizes and firing related events, improving maintainability and reducing code duplication. Also updates method signatures for consistency and adds final modifiers for parameters in several classes. * Remove sending prize messages on crate selection Eliminated the code that sent success messages to players after selecting a crate prize. This streamlines the crate selection process and prevents duplicate or unnecessary messaging. * Clean up SelectCrateExample.yml formatting and comments Removed unnecessary blank lines and redundant comments to improve readability and maintain consistency in the SelectCrateExample.yml configuration file. No functional changes were made. * Improve debug logging in SelectCrateListener Standardized spacing in debug log messages for better readability and removed unused imports from SelectCrateListener.java. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: SrBedrock <51332006+SrBedrock@users.noreply.github.com> Co-authored-by: ThiagoROX <thiagokenis@live.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.