Skip to content

Release 3.17.0#2986

Merged
tastybento merged 5 commits into
masterfrom
develop
May 31, 2026
Merged

Release 3.17.0#2986
tastybento merged 5 commits into
masterfrom
develop

Conversation

@tastybento
Copy link
Copy Markdown
Member

…perience, money, and tamed entities

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 introduces a cancellable “player reset” event family and wires it into PlayersManager#cleanLeavingPlayer, allowing addons to selectively veto specific reset actions (tamed entities, ender chest, inventory, money, health, hunger, XP) when a player leaves/is removed from an island. It also bumps the project version to 3.17.0.

Changes:

  • Add PlayerBaseEvent plus specific reset events and a PlayerEvent builder/factory for firing them.
  • Update PlayersManager#cleanLeavingPlayer to fire a cancellable event before each reset action and skip the action when cancelled.
  • Add/extend unit tests to cover event construction and cancellation behavior.

Reviewed changes

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

Show a summary per file
File Description
build.gradle.kts Bumps build version to 3.17.0.
src/main/java/world/bentobox/bentobox/managers/PlayersManager.java Fires cancellable reset events before each on-leave reset action.
src/main/java/world/bentobox/bentobox/api/events/player/PlayerBaseEvent.java Introduces cancellable base event for player reset events.
src/main/java/world/bentobox/bentobox/api/events/player/PlayerEvent.java Adds builder/factory to construct and call the specific reset events.
src/main/java/world/bentobox/bentobox/api/events/player/PlayerResetEnderChestEvent.java New reset event type (ender chest).
src/main/java/world/bentobox/bentobox/api/events/player/PlayerResetExpEvent.java New reset event type (XP).
src/main/java/world/bentobox/bentobox/api/events/player/PlayerResetHealthEvent.java New reset event type (health).
src/main/java/world/bentobox/bentobox/api/events/player/PlayerResetHungerEvent.java New reset event type (hunger).
src/main/java/world/bentobox/bentobox/api/events/player/PlayerResetInventoryEvent.java New reset event type (inventory), includes HandlerList.
src/main/java/world/bentobox/bentobox/api/events/player/PlayerResetMoneyEvent.java New reset event type (money).
src/main/java/world/bentobox/bentobox/api/events/player/PlayerTamedRemovalEvent.java New reset event type (tamed entity removal).
src/main/java/world/bentobox/bentobox/api/events/player/PlayerUnknownEvent.java New fallback reset event type (unknown).
src/test/java/world/bentobox/bentobox/managers/PlayersManagerTest.java Adds tests asserting cancellation blocks each reset action.
src/test/java/world/bentobox/bentobox/api/events/player/PlayerResetEventsTest.java Adds construction/cancellation tests for the new event family.

Comment thread src/test/java/world/bentobox/bentobox/managers/PlayersManagerTest.java Outdated
tastybento and others added 3 commits May 31, 2026 08:42
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@tastybento tastybento self-assigned this May 31, 2026
@sonarqubecloud
Copy link
Copy Markdown

@tastybento tastybento merged commit a08b7af into master May 31, 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