Skip to content

Harden item and effect compatibility - #300

Merged
BenCodez merged 10 commits into
masterfrom
refactor/item-compatibility
Aug 25, 2026
Merged

BenCodez merged 10 commits into
masterfrom
refactor/item-compatibility

Conversation

@BenCodez

Copy link
Copy Markdown
Owner

Summary

Tighten AdvancedCore's external item/effect compatibility boundaries without changing item or reward configuration keys.

Nexo items

  • keep the existing reflection-based Nexo integration so Nexo remains an optional dependency
  • cache the reflective itemFromId / build methods instead of resolving them on every item lookup
  • validate that Nexo actually returns an ItemStack before casting
  • handle missing/changed Nexo APIs gracefully instead of printing raw stack traces
  • log an integration compatibility failure once rather than spamming every lookup
  • keep the existing public NexoItemHandle#getItem(String) API

Effects

  • centralize boss-bar enum/progress compatibility parsing
  • accept case/whitespace differences for Bukkit BarColor / BarStyle values while keeping the same defaults
  • clamp boss-bar progress consistently in both constructor and setter
  • make player/plugin-null handling safer around delayed boss-bar cleanup

Tests

  • exercises the Nexo reflection boundary against a fake optional API/builder
  • verifies missing custom-item IDs remain null
  • verifies case-insensitive boss-bar parsing and progress clamping

Existing ItemsAdder, Nexo, BossBar.Color, BossBar.Style, and BossBar.Progress configuration paths are unchanged.

@BenCodez
BenCodez marked this pull request as ready for review August 24, 2026 23:12
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c53a15df17

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@BenCodez
BenCodez marked this pull request as draft August 25, 2026 00:04
@BenCodez
BenCodez marked this pull request as ready for review August 25, 2026 00:21
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 422a74b557

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@BenCodez
BenCodez marked this pull request as draft August 25, 2026 00:27
@BenCodez
BenCodez marked this pull request as ready for review August 25, 2026 00:52
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c808bfd74

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@BenCodez
BenCodez marked this pull request as draft August 25, 2026 01:12
@BenCodez
BenCodez marked this pull request as ready for review August 25, 2026 01:28
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@BenCodez
BenCodez merged commit dd81382 into master Aug 25, 2026
4 checks passed
@BenCodez
BenCodez deleted the refactor/item-compatibility branch August 25, 2026 23:44
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.

1 participant