Skip to content

feat: add selectcrate opening type - #21

Merged
SrBedrock merged 18 commits into
dev/1.21.10from
dev/select_roll
Dec 22, 2025
Merged

feat: add selectcrate opening type#21
SrBedrock merged 18 commits into
dev/1.21.10from
dev/select_roll

Conversation

@SrBedrock

Copy link
Copy Markdown
Member

No description provided.

Copilot AI and others added 18 commits December 22, 2025 02:24
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>
@SrBedrock
SrBedrock merged commit 077cee8 into dev/1.21.10 Dec 22, 2025
1 check passed
@SrBedrock
SrBedrock deleted the dev/select_roll branch December 22, 2025 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants