Skip to content

New Release#280

Merged
tastybento merged 10 commits into
masterfrom
develop
Jul 10, 2026
Merged

New Release#280
tastybento merged 10 commits into
masterfrom
develop

Conversation

@tastybento

@tastybento tastybento commented Jul 10, 2026

Copy link
Copy Markdown
Member

Release PR for Limits 1.29.0 (bumps build.version from 1.28.4).

Added by this PR (develop → master)

Also new since 1.28.4 (already merged to master, released with this)

New config options (all defaults preserve existing behaviour except where noted)

Option Default Notes
show-limit-messages true
apply-member-limit-perms false
stacked-plants-count-as-one false recount after changing
blockgrouplimits (+-nether/-end) unset recount after adding a group
log-limits-on-join false changed from true

Custom block ids may now appear as quoted keys in any blocklimits section.

Verification

295 JUnit tests pass on the merged branch. Merge conflicts between develop and master were reconciled so that #277's once-per-join banner applies to the refactored perm-merge loop, and #276's notification respects show-limit-messages and the locale name translations.

🤖 Generated with Claude Code

https://claude.ai/code/session_015dbJyrv2uxHfTmiWkqGUJB

tastybento and others added 6 commits July 10, 2026 07:23
Permission-based limits logged a "Setting login limit via perm" banner
plus one line per environment for every matching permission on join, and
this logging defaulted to on. On servers where owners carry many limit
permissions this spammed the console on every login.

- Default `log-limits-on-join` to false; document it as a debug-only toggle.
- Log the per-login banner once instead of once per matching permission.
- Bump version to 1.29.0 (behaviour change, not just a fix).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014ZEmzuDykNhVyUGHLyrSAL
Quieten permission-limit join logging by default (#277)
Building a copper golem replaces its copper block with a copper chest and
spawns the golem. That block swap fires no BlockPlaceEvent, so the
COPPER_CHEST block limit was never checked and the count never incremented
— players could build unlimited copper chests past the configured limit.

Handle it on the CreatureSpawnEvent (SpawnReason BUILD_COPPERGOLEM, matched
by name so the addon still links on servers < 1.21.9):

- LOW priority: cancel the build and notify nearby players when the island
  is already at its COPPER_CHEST limit. The copper block and pumpkin are
  left untouched, consistent with iron golem / snowman / wither handling.
- MONITOR priority: on a successful build, count the created copper chest so
  the limit stays enforceable and the count does not drift below reality.

Adds three BlockLimitsListener helpers (getCopperChestMaterial,
checkBlockLimit, addBlockCount) and tests for the at-limit, under-limit and
successful-build paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015dbJyrv2uxHfTmiWkqGUJB
SonarCloud flagged 'block-limits.hit-limit' and '[material]' as duplicated
3 times in EntityLimitListener. Extract them into BLOCK_LIMIT_HIT and
BLOCK_PLACEHOLDER constants, matching the existing ENTITY_LIMIT_HIT /
ENTITY_PLACEHOLDER pattern.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015dbJyrv2uxHfTmiWkqGUJB
Cancel copper golem build when at COPPER_CHEST limit (#276)
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prepares a new release by updating the addon’s default join-limit logging behavior and adding enforcement for a copper golem build edge case where a copper block becomes a copper chest without a block-place event (issue #276).

Changes:

  • Default log-limits-on-join to false (config + settings + test) and clarify intent in config comments.
  • Add copper golem build handling to enforce the COPPER_CHEST block limit and keep block counts accurate.
  • Reduce join-permission logging spam by logging a single banner per merge operation; bump build version to 1.29.0.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/test/java/world/bentobox/limits/SettingsTest.java Updates test expectation for new default log-limits-on-join=false.
src/test/java/world/bentobox/limits/listeners/EntityLimitListenerTest.java Adds regression tests for copper golem -> copper chest limit enforcement/counting.
src/main/resources/config.yml Changes default config value for join logging and updates its documentation.
src/main/java/world/bentobox/limits/Settings.java Changes the default fallback for log-limits-on-join to false.
src/main/java/world/bentobox/limits/listeners/JoinListener.java Logs the “setting login limit via perm” banner once per merge instead of per permission.
src/main/java/world/bentobox/limits/listeners/EntityLimitListener.java Adds copper golem build special-casing to enforce COPPER_CHEST block limits and count the chest on successful builds.
src/main/java/world/bentobox/limits/listeners/BlockLimitsListener.java Adds helper APIs to query/count blocks created without place events (for copper chest).
pom.xml Bumps build.version to 1.29.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/resources/config.yml Outdated
tastybento and others added 4 commits July 10, 2026 14:03
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Addresses the Copilot review on #280: checkBlockLimit and addBlockCount
(used for the copper golem's chest, which appears without a place event)
bypassed the ignore-center-block exclusion that process() applies, so a
build at the island center could be limited or counted when a normal
placement there would not be.

The comparison also has to be by block coordinates: these helpers receive
entity spawn locations with fractional coordinates and yaw/pitch, which
never equal the block-aligned center Location. A shared predicate now
covers both helpers and processKey.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015dbJyrv2uxHfTmiWkqGUJB
Paper never fires EntityRemoveEvent for a dimension change:
Entity.removeAfterChangingDimensions() passes a null Bukkit cause and
CraftEventFactory.callEntityRemoveEvent() skips the event when the cause
is null. The justPortaled guard therefore waited for an event that never
comes, and its stale entry swallowed the entity's real death decrement
instead — every mob that crossed a portal left a permanent +1 in the
environment where it died (and the list grew unboundedly).

Remove the guard: onEntityPortal alone transfers the count between
environments, and the eventual death fires exactly one EntityRemoveEvent
in the destination world.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015dbJyrv2uxHfTmiWkqGUJB
…counts

Fix phantom entity counts left by portaled mobs
@sonarqubecloud

Copy link
Copy Markdown

@tastybento tastybento merged commit 47bb6bb into master Jul 10, 2026
5 checks passed
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