Skip to content

fix: add CLV EXP event compatibility aliases#28

Merged
CroaBeast merged 3 commits into
masterfrom
croabeast
May 12, 2026
Merged

fix: add CLV EXP event compatibility aliases#28
CroaBeast merged 3 commits into
masterfrom
croabeast

Conversation

@CroaBeast
Copy link
Copy Markdown
Collaborator

@CroaBeast CroaBeast commented May 12, 2026

Summary

  • bump version to 1.2.1
  • refresh CyberCore dependency
  • add CLV EXP event compatibility aliases for integrations

Commits

  • chore: bump version to 1.2.1
  • chore: refresh CyberCore dependency
  • fix: add CLV exp event compatibility aliases

View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

@review-me-code
Copy link
Copy Markdown

Pull request overview

The change is minimal and focused. All five methods are simple delegations to existing fields, with Javadoc explaining the compatibility purpose. The @NotNull contract on getPlayer() is reasonable given the event should only fire for online players. No issues with the diff — it matches the stated PR intent of adding CLV EXP event compatibility aliases. The getAmount/setAmount pair is the only mutable exposure here; worth noting that callers using setAmount will mutate the same expAmount field used by the rest of the event pipeline, which is presumably intentional but is a footgun if any listener caches the value before calling setAmount.

Changes:

  • The version bump and CyberCore dependency refresh in build.gradle.kts and the JAR are routine.
  • The core change is in ExpChangeEvent.java — five new methods added as compatibility aliases for integrations:
  • getPlayer() — delegates to user.getPlayer() for reflection-based hooks that expect a direct Bukkit player accessor.
  • getAmount() / setAmount(double) — legacy-style getter/setter for the mutable EXP delta (expAmount).
  • getOldXP() / getNewXP() — legacy-style accessors for the before/after EXP values (oldExp / newExp).

Reviewed changes

No blocking or high-confidence comments.

Reviewed 3 changed files in this pull request and generated no inline comments.


Generated by pull_request.opened.

@Klema4 Klema4 self-requested a review May 12, 2026 14:28
Copy link
Copy Markdown
Collaborator

@Klema4 Klema4 left a comment

Choose a reason for hiding this comment

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

Yep

@CroaBeast CroaBeast merged commit 1a8451c into master May 12, 2026
1 check 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