feat: Add ExcellentShop v5 shop integration#252
Open
jayesh-kambli wants to merge 8 commits into
Open
Conversation
- Add ExcellentShopProvider: scans VirtualShop products, caches best sell price per Material (lazy, invalidatable), returns 0 for non-item or non-sellable products - Wire into ShopIntegrationManager auto-detect and specific config cases - Add su.nightexpress.excellentshop api+Core as compileOnly dependencies - Add mavenLocal() to repository list for locally built ExcellentShop - Add content filter to nightexpress repo (su.nightexpress.* only) to prevent timeouts when resolving unrelated dependencies - Bump targetJavaVersion: 25 kept as-is (requires JDK 25 to build)
…heck - Add ExcellentShop to plugin.yml softdepend so Bukkit loads it before SmartSpawner, ensuring ShopAPI is initialized when isAvailable() runs - Remove ShopAPI.isInitialized() guard from isAvailable() since plugin being enabled is sufficient — the API is always ready at that point
- Cache now builds on ServerLoadEvent instead of lazily on first call, ensuring ExcellentShop's async data load is complete before reading prices - AtomicBoolean for cacheBuilt prevents double-build race condition on Folia - ConcurrentHashMap for thread-safe reads from multiple region threads - Fix sellPrice filter: was dropping sellPrice=0 (valid price), now only drops sellPrice<0 (-1 = disabled) - Allow cache retry if build fails (cacheBuilt reset on exception) - Register as Listener inside isAvailable() for ServerLoadEvent - Detailed logging at each failure point
softdepend in plugin.yml has no effect for Paper plugins - load order between Paper plugins and Bukkit plugins is controlled by paper-plugin.yml. ExcellentShop (Bukkit plugin) must load BEFORE SmartSpawner (Paper plugin) so the API is initialized when isAvailable() runs.
Shows all sellable items across all spawners grouped by spawner type, with per-item price source breakdown: - [Shop] price sourced from ExcellentShop (green) - [Custom] price from item_prices.yml (yellow) - [Fallback] secondary source used due to priority mode (yellow) - [Not Configured] no price found in any source (red) Fully respects price_source_mode (SHOP_PRIORITY, CUSTOM_PRIORITY, SHOP_ONLY, CUSTOM_ONLY). Summary at bottom shows counts per category with a warning if any items are unconfigured. Exposed getShopPriceFor(), getCustomPriceFor(), getPriceSourceMode() on ItemPriceManager for analysis use. Permission: smartspawner.command.priceanalysis (default: op)
/ss priceanalysis — all spawners (existing behavior)
/ss priceanalysis <tab> — autocompletes only entity types that have
active spawners loaded on the server
/ss priceanalysis pig — individual lookup for that spawner type
Tab completion is dynamic: queries actual loaded spawners so it only
suggests types that exist, not the full EntityType enum.
SHOP_ONLY -> only mention shop plugin CUSTOM_ONLY -> only mention item_prices.yml SHOP_PRIORITY / CUSTOM_PRIORITY -> mention both with correct preference order
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.
Summary
Adds
ExcellentShopProviderso SmartSpawner can read sell prices directly from ExcellentShop v5 virtual shops.Changes
New file:
ExcellentShopProvider.javaShopProviderfor ExcellentShop v5 (su.nightexpress.excellentshop)ServerLoadEvent(after ExcellentShop async data load completes) and caches the best sell price perMaterialisSellable()andContentType.ITEMConcurrentHashMap+AtomicBooleanfor Folia thread safetyinvalidateCache()available for reload scenariosShopIntegrationManager.javapreferred_plugin: ExcellentShoppaper-plugin.ymlExcellentShop: load: BEFOREto dependencies to guarantee correct load order (SmartSpawner is a Paper plugin, ExcellentShop is a Bukkit plugin sosoftdependinplugin.ymlhas no effect between the two)plugin.ymlExcellentShoptosoftdependfor Bukkit-level awarenessbuild.gradle.ktsmavenLocal()to repositories for locally built ExcellentShop APIsu.nightexpress.*) to prevent timeout cascades when resolving unrelated dependenciesTesting
Tested on Paper 1.21.11 and Canvas 1.21.11 (Folia fork) with ExcellentShop v5.1.1 and NightCore 2.15.3.
On startup: