Conversation
* Fix PDC key usage and handle invalid JSON in GetStringList
Updated BagData to use correct PDC keys ('filter' and 'blacklist' instead of 'bag-filter' and 'bag-blacklist'). Improved PDC.GetStringList to handle invalid JSON arrays used by HavenBagsPreview gracefully, by returning an empty list. Bumped version to 1.39.4.
* Optimize bag saving by skipping empty saves
Moved the auto-save message and added a check to return early if there are no bags to save, preventing unnecessary log messages and operations when there is nothing to persist.
* Refactor config conversion logic into separate classes
Moved configuration and data conversion methods from Main.java into dedicated classes under configconversion package for better modularity and maintainability. Updated import statements and usage accordingly. Increased required ValorlessUtils build number to 313. Minor cleanup of unused imports.
* Add migration docs and enhance config conversion classes
Added detailed Javadoc comments to BagConversion, DataConversion, and TokenConfigConversion to document migration logic, thread-safety, and side effects. Introduced @NotNull annotations to method parameters for clarity. Created package-info.java with an overview of the configconversion package and its responsibilities. These changes improve maintainability and developer understanding of migration utilities.
* Refactor config keys to use nested structure
Updated configuration keys throughout the codebase to use a more organized, nested structure (e.g., 'bag.texture', 'auto-save.interval', 'sound.open.key'). Added ConfigRestructure utility for future config migrations. Updated default values and validation to match the new structure, and refactored all usages in commands, features, and API accordingly.
* Add config backup before restructure
Before updating configuration files to version 6, a backup of the current config is now created. This ensures that the original configuration can be restored if needed and aborts the restructure if the backup fails.
* Update PvPManager dependency to v4.0.4
Upgraded PvPManager dependency from v3.17.8 to v4.0.4 and updated groupId to 'me.chancesd.pvpmanager' in all pom files. Refactored BagListener to use CombatPlayer API for compatibility with PvPManager v4.0.4. Updated build number.
* Add documentation for config restructure to version 6
Expanded JavaDoc in ConfigRestructure to describe the migration process to config-version 6, including backup creation, key restructuring, and safety notes. Updated package-info.java to document the new config restructure step and reference the ConfigRestructure class.
* Improve bag texture command and config restructure
Added error handling for missing bag textures and improved feedback in CommandTexture. Refactored config backup logic in ConfigRestructure to use build number from plugin version. Updated language entries and fixed config migration for auto-pickup settings. Minor code cleanups and build number increment.
* Refactor inventory-lock config to support granular options
Replaces the boolean 'inventory-lock' config with a section supporting 'enabled', 'unbound', 'bound', 'unused', and 'used' options for finer control. Updates config validation, migration logic, and InventoryLock event handling to use the new structure. Increases build number.
* Improve item blacklist handling and messaging
Added a check to ignore AIR items in IsItemBlacklisted and improved whitelist logic. Updated BagGUI to display a more accurate message when a blacklisted item is detected on shift-click.
* Add carry limit bypass for specific bags and debug logs
Introduced a 'carry-limit' property for bags, allowing certain bags to bypass the carry limit check. Updated the carry limit logic to respect this property and added debug logging for offline bag operations in AdminGUI, specifically for the user 'Alynie'. Updated configuration and build number accordingly.
* Respect 'climit' tag in bag carry limit checks
Updated BagCarryLimit logic to skip items with the 'climit' tag when enforcing bag carry limits. This prevents items marked with this tag from being counted or dropped due to carry limit restrictions.
* Add bag open checks and update version to 1.40.0
Added checks to prevent certain commands from executing if a bag is currently open, addressing a potential exploit. Updated project version to 1.40.0 in pom.xml and dependency-reduced-pom.xml. Improved carry limit logic by checking for the presence of the 'climit' tag before evaluating its value. Updated build number.
* Refactor BagData to use HashMap for bag storage
Replaces the List<Data> with HashMap<UUID, Data> in BagData for more efficient bag lookup and management. Updates all relevant methods to use the new data structure, improving performance and code clarity. Also updates MySQL.loadAllBags to return a HashMap and adjusts Lang.Parse to simplify placeholder parsing logic.
* Add HavenBags JAR builds for versions 1.39.3–1.40.0
Added multiple HavenBags JAR files for versions 1.39.3, 1.39.4 (Pre-1.40.0), and 1.40.0 to the builds directory. This includes incremental builds from 2681 to 2708, supporting version tracking and distribution.
* Add MySQL connection and socket timeout settings
Introduced 'connect_timeout' and 'socket_timeout' options to MySQL configuration in config.yml and ConfigValidation. Updated MySQL.java to use these settings for improved connection handling and reliability.
* Validate bag UUIDs and add getbag helper
Add defensive UUID validation to BagExists, GetBag and IsBagOpen to return early for the literal "null" string and invalid UUIDs (avoid IllegalArgumentException). Factor repeated lookup logic into a private getbag(String) helper used by GetBag. Also bump buildNumber in buildNumber.properties to 2716.
* Use getbag() helper and log on shutdown
Include the shutdown flag when deciding to print auto-save messages so saving is logged during shutdown. Bump build number (2716 -> 2717).
* Use slot-based bag sizes and skin token lookup
Switch bag size handling from multiplicative (1-6 -> size*9) to explicit slot counts and resolve named textures for skin tokens. Key changes:
- CommandGive: accept raw size values, compute nearest 9-slot size via HavenBags.findClosestNine(), store PDC "size" as slot count (9-54) instead of size*9, update lore placeholders accordingly, and choose head textures/custom model data based on computed slots. Also updated item creation flow and minor formatting/import fixes.
- TabCompletion: replace size suggestions (1-6) with slot suggestions (9,18,27,36,45,54).
- HavenBags.CreateSkinToken: resolve short identifiers by looking up Main.textures (textures.<id>), use resolved skin or provided base64 when setting player head texture, and ensure lore %skin% placeholder is replaced correctly.
- CommandToken: simplified flow to always call CreateSkinToken and give the token if created; clearer error message on invalid texture.
- Misc: small whitespace/formatting tweaks and bumped buildNumber to 2728.
These changes make bag sizing explicit (slots) and allow named texture lookups for skin tokens, improving UX and flexibility.
* Cache base64 check for skin/head logic
Introduce a boolean isBase64 to avoid repeated value.chars().count() checks and clarify intent. Use isBase64 when resolving texture lookup, building lore replacements, and deciding whether to apply a player head texture; behavior remains the same but is more readable and slightly more efficient.
* Add MySQL chunked saves for bags
Chunk large bag save operations before sending to MySQL to avoid oversized/long-running queries. Replaced direct getMysql().saveBags(toSave) calls with looping over mysql.chunkify(..., mysql.getMaxChunkSize()) in both sync and async paths. Added mysql.max_chunk_size validation entry (default 200) and a maxChunkSize field/getter in MySQL, loaded from config. Implemented MySQL.chunkify(List, chunkSize) with a safe fallback when chunkSize <= 0. Also bumped buildNumber to 2729.
* Chunk MySQL bag saves and handle PacketTooBig
Split large bag save operations into chunks before calling MySQL.saveBags to avoid sending too much data at once. BagData now iterates mysql.chunkify(toSave, mysql.getMaxChunkSize()) and saves each chunk synchronously or asynchronously as appropriate (old single-call lines left commented). MySQL.java adds an import for PacketTooBigException and catches it to log a clear error suggesting lowering mysql.max_chunk_size in config.yml, and prints the stack trace. This prevents large payloads from failing silently with PacketTooBigException.
* Introduce Sound model and migrate sound handling
Add a new Sound datamodel and a SFX utility to centralize sound playback and compatibility handling, including support for namespaced keys and fallbacks to the legacy valorless utils. Replace numerous SFX.Play usages across listeners, GUIs, features and commands with the new Sound model (constructed or parsed) and call Sound.play(player/location). Update particle and entity enum usages (BLOCK_DUST->BLOCK, ITEM_CRACK->ITEM, SMOKE_NORMAL->SMOKE, DROPPED_ITEM->ITEM) and simplify BagEffects legacy mapping. Bump spigot-api version in pom.xml to 1.21.11-R0.1-SNAPSHOT. These changes improve version compatibility and allow modern namespaced sound identifiers while preserving fallbacks.
* Add tooltip style support for bags
Introduce customizable tooltip styles for bag items and wire them through config, custom-bag definitions, persistence, and ItemMeta application. Changes include: new Data.tooltipStyle field with getter/setter; config validation and default config key bag.tooltip-style; custom-bags.yml example and PDC storage (PDC key "tooltip"); Files persistence using "tooltip-style" and DatabaseUtils handling of tooltip values; reading tooltip values in BagData. When the server is v1.21.3 or newer, NamespacedKey.fromString values are applied to ItemMeta.setTooltipStyle so tooltips reflect per-bag or global configuration.
* Bump build number to 2730
Increment buildNumber to 2730 and update the build timestamp in src/main/resources/buildNumber.properties to reflect a new build.
* Update dependency-reduced-pom.xml
* Use Registry for PotionEffect lookup
Search PotionEffectType via Bukkit Registry instead of the old iteration: add org.bukkit.Registry import and loop Registry.EFFECT, matching effect keys by toString(), then fall back to a LegacyEffect mapper. Restore and update LegacyEffect to map legacy names to the newer PotionEffectType constants. Also bump buildNumber (2730 -> 2732) and timestamp in buildNumber.properties.
* Update pom.github.xml
* Rename main workflow and add dev CI
Rename .github/workflows/maven.yml to build-main.yml and restrict its push trigger to the main branch. Add a new maven-dev.yml workflow for the dev branch that sets up JDK 21, caches Maven, conditionally builds or reuses a Spigot JAR, extracts the project version from pom.xml, updates pom.github.xml, builds with Maven using pom.github.xml, renames the produced JAR to include branch and commit identifiers, and uploads it as an artifact. This splits CI between main and dev pipelines so dev-only builds and artifact naming are handled separately.
* Update maven-dev.yml
* Add build badges and update version info in README
Updated README to include build badges and change versioning information.
* Bump version to 1.41.0 and update build/config
Bump project version from 1.40.1 to 1.41.0 in pom.xml and dependency-reduced-pom.xml. Increment buildNumber to 2733 and update its timestamp in buildNumber.properties. Add mysql.max_chunk_size: 200 to config.yml to control the maximum chunk size for DB operations.
* Add HavenBags build JARs for 1.40.1/1.41.0
Add multiple binary build artifacts for HavenBags: 1.40.1 (Pre-1.41.0) JARs 2710–2732 and a 1.41.0 JAR 2733 under builds/. These are compiled outputs/packaged JARs; consider moving them to release storage or CI artifact storage and adding appropriate .gitignore entries to avoid committing large binaries to the repository.
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.
Updated BagData to use correct PDC keys ('filter' and 'blacklist' instead of 'bag-filter' and 'bag-blacklist'). Improved PDC.GetStringList to handle invalid JSON arrays used by HavenBagsPreview gracefully, by returning an empty list. Bumped version to 1.39.4.
Moved the auto-save message and added a check to return early if there are no bags to save, preventing unnecessary log messages and operations when there is nothing to persist.
Moved configuration and data conversion methods from Main.java into dedicated classes under configconversion package for better modularity and maintainability. Updated import statements and usage accordingly. Increased required ValorlessUtils build number to 313. Minor cleanup of unused imports.
Added detailed Javadoc comments to BagConversion, DataConversion, and TokenConfigConversion to document migration logic, thread-safety, and side effects. Introduced @NotNull annotations to method parameters for clarity. Created package-info.java with an overview of the configconversion package and its responsibilities. These changes improve maintainability and developer understanding of migration utilities.
Updated configuration keys throughout the codebase to use a more organized, nested structure (e.g., 'bag.texture', 'auto-save.interval', 'sound.open.key'). Added ConfigRestructure utility for future config migrations. Updated default values and validation to match the new structure, and refactored all usages in commands, features, and API accordingly.
Before updating configuration files to version 6, a backup of the current config is now created. This ensures that the original configuration can be restored if needed and aborts the restructure if the backup fails.
Upgraded PvPManager dependency from v3.17.8 to v4.0.4 and updated groupId to 'me.chancesd.pvpmanager' in all pom files. Refactored BagListener to use CombatPlayer API for compatibility with PvPManager v4.0.4. Updated build number.
Expanded JavaDoc in ConfigRestructure to describe the migration process to config-version 6, including backup creation, key restructuring, and safety notes. Updated package-info.java to document the new config restructure step and reference the ConfigRestructure class.
Added error handling for missing bag textures and improved feedback in CommandTexture. Refactored config backup logic in ConfigRestructure to use build number from plugin version. Updated language entries and fixed config migration for auto-pickup settings. Minor code cleanups and build number increment.
Replaces the boolean 'inventory-lock' config with a section supporting 'enabled', 'unbound', 'bound', 'unused', and 'used' options for finer control. Updates config validation, migration logic, and InventoryLock event handling to use the new structure. Increases build number.
Added a check to ignore AIR items in IsItemBlacklisted and improved whitelist logic. Updated BagGUI to display a more accurate message when a blacklisted item is detected on shift-click.
Introduced a 'carry-limit' property for bags, allowing certain bags to bypass the carry limit check. Updated the carry limit logic to respect this property and added debug logging for offline bag operations in AdminGUI, specifically for the user 'Alynie'. Updated configuration and build number accordingly.
Updated BagCarryLimit logic to skip items with the 'climit' tag when enforcing bag carry limits. This prevents items marked with this tag from being counted or dropped due to carry limit restrictions.
Added checks to prevent certain commands from executing if a bag is currently open, addressing a potential exploit. Updated project version to 1.40.0 in pom.xml and dependency-reduced-pom.xml. Improved carry limit logic by checking for the presence of the 'climit' tag before evaluating its value. Updated build number.
Replaces the List with HashMap<UUID, Data> in BagData for more efficient bag lookup and management. Updates all relevant methods to use the new data structure, improving performance and code clarity. Also updates MySQL.loadAllBags to return a HashMap and adjusts Lang.Parse to simplify placeholder parsing logic.
Added multiple HavenBags JAR files for versions 1.39.3, 1.39.4 (Pre-1.40.0), and 1.40.0 to the builds directory. This includes incremental builds from 2681 to 2708, supporting version tracking and distribution.
Introduced 'connect_timeout' and 'socket_timeout' options to MySQL configuration in config.yml and ConfigValidation. Updated MySQL.java to use these settings for improved connection handling and reliability.
Add defensive UUID validation to BagExists, GetBag and IsBagOpen to return early for the literal "null" string and invalid UUIDs (avoid IllegalArgumentException). Factor repeated lookup logic into a private getbag(String) helper used by GetBag. Also bump buildNumber in buildNumber.properties to 2716.
Include the shutdown flag when deciding to print auto-save messages so saving is logged during shutdown. Bump build number (2716 -> 2717).
Switch bag size handling from multiplicative (1-6 -> size*9) to explicit slot counts and resolve named textures for skin tokens. Key changes:
These changes make bag sizing explicit (slots) and allow named texture lookups for skin tokens, improving UX and flexibility.
Introduce a boolean isBase64 to avoid repeated value.chars().count() checks and clarify intent. Use isBase64 when resolving texture lookup, building lore replacements, and deciding whether to apply a player head texture; behavior remains the same but is more readable and slightly more efficient.
Chunk large bag save operations before sending to MySQL to avoid oversized/long-running queries. Replaced direct getMysql().saveBags(toSave) calls with looping over mysql.chunkify(..., mysql.getMaxChunkSize()) in both sync and async paths. Added mysql.max_chunk_size validation entry (default 200) and a maxChunkSize field/getter in MySQL, loaded from config. Implemented MySQL.chunkify(List, chunkSize) with a safe fallback when chunkSize <= 0. Also bumped buildNumber to 2729.
Split large bag save operations into chunks before calling MySQL.saveBags to avoid sending too much data at once. BagData now iterates mysql.chunkify(toSave, mysql.getMaxChunkSize()) and saves each chunk synchronously or asynchronously as appropriate (old single-call lines left commented). MySQL.java adds an import for PacketTooBigException and catches it to log a clear error suggesting lowering mysql.max_chunk_size in config.yml, and prints the stack trace. This prevents large payloads from failing silently with PacketTooBigException.
Add a new Sound datamodel and a SFX utility to centralize sound playback and compatibility handling, including support for namespaced keys and fallbacks to the legacy valorless utils. Replace numerous SFX.Play usages across listeners, GUIs, features and commands with the new Sound model (constructed or parsed) and call Sound.play(player/location). Update particle and entity enum usages (BLOCK_DUST->BLOCK, ITEM_CRACK->ITEM, SMOKE_NORMAL->SMOKE, DROPPED_ITEM->ITEM) and simplify BagEffects legacy mapping. Bump spigot-api version in pom.xml to 1.21.11-R0.1-SNAPSHOT. These changes improve version compatibility and allow modern namespaced sound identifiers while preserving fallbacks.
Introduce customizable tooltip styles for bag items and wire them through config, custom-bag definitions, persistence, and ItemMeta application. Changes include: new Data.tooltipStyle field with getter/setter; config validation and default config key bag.tooltip-style; custom-bags.yml example and PDC storage (PDC key "tooltip"); Files persistence using "tooltip-style" and DatabaseUtils handling of tooltip values; reading tooltip values in BagData. When the server is v1.21.3 or newer, NamespacedKey.fromString values are applied to ItemMeta.setTooltipStyle so tooltips reflect per-bag or global configuration.
Increment buildNumber to 2730 and update the build timestamp in src/main/resources/buildNumber.properties to reflect a new build.
Update dependency-reduced-pom.xml
Use Registry for PotionEffect lookup
Search PotionEffectType via Bukkit Registry instead of the old iteration: add org.bukkit.Registry import and loop Registry.EFFECT, matching effect keys by toString(), then fall back to a LegacyEffect mapper. Restore and update LegacyEffect to map legacy names to the newer PotionEffectType constants. Also bump buildNumber (2730 -> 2732) and timestamp in buildNumber.properties.
Update pom.github.xml
Rename main workflow and add dev CI
Rename .github/workflows/maven.yml to build-main.yml and restrict its push trigger to the main branch. Add a new maven-dev.yml workflow for the dev branch that sets up JDK 21, caches Maven, conditionally builds or reuses a Spigot JAR, extracts the project version from pom.xml, updates pom.github.xml, builds with Maven using pom.github.xml, renames the produced JAR to include branch and commit identifiers, and uploads it as an artifact. This splits CI between main and dev pipelines so dev-only builds and artifact naming are handled separately.
Update maven-dev.yml
Add build badges and update version info in README
Updated README to include build badges and change versioning information.
Bump project version from 1.40.1 to 1.41.0 in pom.xml and dependency-reduced-pom.xml. Increment buildNumber to 2733 and update its timestamp in buildNumber.properties. Add mysql.max_chunk_size: 200 to config.yml to control the maximum chunk size for DB operations.
Add multiple binary build artifacts for HavenBags: 1.40.1 (Pre-1.41.0) JARs 2710–2732 and a 1.41.0 JAR 2733 under builds/. These are compiled outputs/packaged JARs; consider moving them to release storage or CI artifact storage and adding appropriate .gitignore entries to avoid committing large binaries to the repository.