Skip to content

feat: expand the about command - #37

Merged
CroaBeast merged 6 commits into
masterfrom
croabeast
Aug 7, 2026
Merged

feat: expand the about command#37
CroaBeast merged 6 commits into
masterfrom
croabeast

Conversation

@CroaBeast

@CroaBeast CroaBeast commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • bump version to 1.3.0
  • rewrite /clv about to report server, authors, database state and config
  • resolve CyberCore 2.1.0 from source through a composite build instead of the bundled jar
  • expose library() as TextLibrary so the lang prefix API is reachable
  • check out CyberCore in the build and release workflows
  • update the Gradle wrapper to 9.6.1

Contributors


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@CroaBeast
CroaBeast requested review from Kihsomray and Klema4 August 7, 2026 06:48
@CroaBeast CroaBeast self-assigned this Aug 7, 2026

@review-me-code review-me-code 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.

Pull request overview

This PR bumps CyberLevels to 1.3.0 and rewrites /clv about to surface runtime state (server version, authors, database connection/enabled/type, auto-save, leaderboard, and the EXP engine). It also moves the CyberCore dependency from a bundled jar to a composite build resolved from source via settings.gradle.kts, exposes library() as TextLibrary so the lang prefix API is reachable, and updates the Gradle wrapper to 9.6.1. CI workflows now check out CyberCore alongside the plugin so the composite build resolves in CI as well as locally.

Changes:

  • build.gradle.kts: version bumped to 1.3.0; CyberCore dependency switched from files("libraries/CyberCore-2.0.0.jar") to com.bitaspire:CyberCore:2.1.0 (resolved via composite build).
  • settings.gradle.kts: new includeBuild block that locates a sibling CyberCore checkout (or a CyberCore/ subfolder in CI) and substitutes it for the published coordinate.
  • .github/workflows/build.yml and release.yml: added a Checkout CyberCore dependency step that clones BitAspire/CyberCore into CyberCore/ so the composite build resolves.
  • gradle/wrapper/gradle-wrapper.properties: bumped to Gradle 9.6.1.
  • CyberLevels.java: library() return type changed from TakionLib to TextLibrary (import added).
  • CLVCommand.java: /clv about now delegates to a new sendAbout helper that reports server, authors, database state, config flags, and engine; console path uses main.logger(lines).
  • CLVCommand.java: ChatColor.translateAlternateColorCodes replaced with PrismaticAPI.colorize in sendLangMessage (two sites).
  • CLVCommand.java: resolveUserByName now uses main.getServer() instead of the static Bukkit accessor.
  • libraries/CyberCore-2.0.0.jar: deleted (no longer bundled).

Reviewed changes

  • High settings.gradle.kts - Composite build silently falls back to the published coordinate when no checkout is present
    firstOrNull { it.resolve("settings.gradle.kts").isFile } means that if neither ../CyberCore nor ./CyberCore exists, includeBuild is never called and Gradle resolves com.bitaspire:CyberCore:2.1.0 from mavenLocal()/Maven Central. CyberCore 2.1.0 is not published there, so a fresh clone without the sibling checkout will fail with an obscure dependency-resolution error instead of a clear message. Either fail fast when no candidate is found, or document that a sibling checkout is mandatory.
  • High .github/workflows/release.yml - Release workflow checks out CyberCore from the default branch, not the version being released
    The new step uses actions/checkout@v4 with no ref, so it pulls BitAspire/CyberCore@main. If a release is cut from a CyberLevels commit that targets a CyberCore tag/branch other than main, the released artifact will be built against an unrelated CyberCore HEAD. Pin the checkout to the CyberCore ref that matches the 2.1.0 coordinate (e.g. a tag or a ref: input).
  • Medium src/main/java/com/bitaspire/cyberlevels/command/CLVCommand.java - sendAbout reads userManager() without a null guard on the manager itself
    main.userManager() == null ? null : main.userManager().getDatabase() is fine, but the surrounding code calls main.cache().config().database().isEnabled() unconditionally. If cache() or config() can be null before the plugin is fully enabled (e.g. /clv about during reload), this NPEs. Consider guarding or asserting the plugin is enabled before reporting config-derived fields.
  • Medium src/main/java/com/bitaspire/cyberlevels/command/CLVCommand.java - databaseConnected is computed but never used to gate the message
    The boolean is only printed as part of the Database: line. When the database is configured but disconnected, the message still claims the plugin is healthy. Consider surfacing a warning prefix (e.g. &c) or a separate &cDisconnected line so operators can spot the issue at a glance.
  • Medium src/main/java/com/bitaspire/cyberlevels/command/CLVCommand.java - serverInfo() swallows the real cause when VNC.SERVER is null
    Returning the literal string "Unknown" hides why the version is unknown (VNC not initialized, shaded away, etc.). At minimum log a warning the first time it happens, or include the exception cause if one is available.
  • Medium src/main/java/com/bitaspire/cyberlevels/CyberLevels.java - library() return type change is a breaking API change for downstream consumers
    Any addon or integration that called CyberLevels#getLibrary() and assigned it to TakionLib will fail to compile against 1.3.0. If TakionLib is still part of the public API, consider keeping the method signature and adding a new accessor (e.g. textLibrary()), or document the breaking change in the changelog.
  • Low src/main/java/com/bitaspire/cyberlevels/command/CLVCommand.java - Console path drops color codes silently
    main.logger(lines) is called with raw &-prefixed strings. If the logger does not colorize, the console will show literal &d&lCyber&f&lLevels. Verify that main.logger(String[]) runs the same colorization pipeline as createSender(...).send(...), or strip/translate the codes before logging.
  • Low .github/workflows/build.yml - Workflow comment duplicates the same instruction in two files
    The "Keep the path in sync with the candidates listed there" comment is repeated verbatim in build.yml and release.yml. If the path ever changes, both comments must be updated. Consider referencing a single source of truth (e.g. a README section) or extracting the checkout into a composite action / reusable workflow.
  • Low gradle/wrapper/gradle-wrapper.properties - Gradle 9.6.1 wrapper bump is not mentioned in the PR description
    The summary lists the wrapper bump, but reviewers should confirm 9.6.1 is intentional (vs. 9.6.0) and that no plugin in the build (Spigot, Shadow, Lombok) has known incompatibilities with 9.6.x.

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


Generated by pull_request.opened.

Comment thread settings.gradle.kts
// plugin can be developed against unpublished changes. Locally the checkouts are sibling folders;
// CI checks them out inside this repository instead. They are not on any maven repository, so the
// checkout is required rather than a fallback.
listOf("CyberCore").forEach { dependency ->

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fail fast when no CyberCore checkout is found so a fresh clone doesn't fall through to Maven Central and produce a confusing resolution error.

Suggested change
listOf("CyberCore").forEach { dependency ->
listOf("CyberCore").forEach { dependency ->
val included = listOf("../$dependency", dependency)
.map(::file)
.firstOrNull { it.resolve("settings.gradle.kts").isFile }
checkNotNull(included) {
"Cannot locate a local checkout of '$dependency'. Expected a sibling folder or './$dependency' containing settings.gradle.kts."
}
includeBuild(included)
}


# settings.gradle.kts picks this checkout up as an included build. Keep the path
# in sync with the candidates listed there, otherwise the build cannot resolve it.
- name: Checkout CyberCore dependency

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pin the CyberCore checkout to the ref that matches the 2.1.0 coordinate so releases aren't built against an unrelated HEAD.

Suggested change
- name: Checkout CyberCore dependency
- name: Checkout CyberCore dependency
uses: actions/checkout@v4
with:
repository: BitAspire/CyberCore
ref: 2.1.0
path: CyberCore

" &d&lCyber&f&lLevels &fv" + main.getDescription().getVersion() + "&7.",
" &7Server: &f" + serverInfo(),
" &7Authors: &f" + main.getAuthors(),
" &7Database: &f" + databaseConnected + " &7(enabled: &f" + databaseEnabled +

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Make the disconnected state visually obvious so operators can spot a broken DB at a glance.

Suggested change
" &7Database: &f" + databaseConnected + " &7(enabled: &f" + databaseEnabled +
" &7Database: &f" + (databaseConnected ? "&aconnected" : "&cdisconnected") +
" &7(enabled: &f" + databaseEnabled +
"&7, type: &f" + main.cache().config().database().getType() + "&7)",

@Klema4 Klema4 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good

@CroaBeast
CroaBeast merged commit 21df20e into master Aug 7, 2026
2 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