Add ItemsAdder and Oraxen custom block limits#288
Merged
Conversation
20fdc22 to
886f8a5
Compare
Custom block ids can now be used directly as blocklimits keys (all sections: blocklimits, -nether, -end, worlds): ItemsAdder ids as-is (namespace:id), Oraxen ids prefixed "oraxen:". The config parser already produced NamespacedKeys; registerLimit now accepts non-minecraft namespaces instead of rejecting them. Enforcement listens to the plugins' own place/break events (fixing the 2023 event-ordering problem where the alert fired but the block still placed) through new soft-registered listeners that only load when the respective plugin is present. Both feed processKey, a public extraction of the existing count/limit core, so island lookup, per-env limits, offsets, batching, and the GUI all work unchanged - custom keys render with a paper icon and prettified name. Custom counts are event-tracked and invisible to the recount chunk scan, so the recount now carries non-minecraft counts across the reset instead of zeroing them. Fixes #176 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015dbJyrv2uxHfTmiWkqGUJB
886f8a5 to
1146553
Compare
|
tastybento
added a commit
that referenced
this pull request
Jul 10, 2026
Brings the eight feature merges (#281-#288) into the release branch and reconciles them with develop's #276 copper golem chest limit and #277 quiet join logging: - pom.xml: master's dependency additions with develop's 1.29.0 bump. - JoinListener: the once-per-join log banner from #277 applied to the refactored mergePerms loop. - EntityLimitListener: copper golem checks grafted onto master's version; tellPlayersBlockLimit now respects show-limit-messages and uses the locale name translations, consistent with the other notify sites. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015dbJyrv2uxHfTmiWkqGUJB
Merged
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.



Fixes #176.
Config
No new section — custom ids go straight into the existing
blocklimitsmachinery (including-nether/-endandworlds:overrides):The parser already produced
NamespacedKeys for colon keys;registerLimitnow accepts non-minecraftnamespaces instead of rejecting them, and the per-env data model stores them natively (no migration).How enforcement works
Two thin listeners, registered only when the respective plugin is installed (no hard dependency; the API jars are
providedat the same versions BentoBox compiles against):ItemsAdderListener—CustomBlockPlaceEvent/CustomBlockBreakEventOraxenListener— note-block and string-block place/break eventsBoth feed
processKey, a public extraction of the existing count/limit core, so island lookup, per-environment limits, offsets, save batching, and the limits GUI (paper icon + prettified name) all work unchanged. Listening to the plugins' own events is what fixes the 2023 blocker on this ticket — the old prototype raced Bukkit's block events and the block placed anyway; the custom events can't desync that way.The recount chunk scan can't see custom blocks (they're physically note blocks etc.), so
RecountCalculatornow carries non-minecraft counts across the reset instead of zeroing them. Documented in the config comments.Deliberate v1 scope
Testing
JUnit covers
processKey(limit hit, count, decrement for a custom key), config parsing of custom keys, and id→key mapping. The listeners themselves need in-game verification with the real plugins — @Olthoo offered to test back in 2023 and users were still asking in 2025:blocklimits, restart./is limitsshows the custom entry (paper icon)./is limits recount→ the custom count is unchanged afterwards."oraxen:<id>".🤖 Generated with Claude Code
https://claude.ai/code/session_015dbJyrv2uxHfTmiWkqGUJB