Skip to content

servers: explicitly detect fabric-server-launch.jar and include it in errors #46

Open

Description

@DarkLabsStudio

Summary

findServerJar only special-cases paper-*.jar, purpur-*.jar, and server.jar. Other jars, including fabric-server-launch.jar, are accepted only as a generic fallback with score 0. If a higher-priority jar exists, Fabric is silently skipped; if no jar is found, the error message does not mention Fabric.

Current behavior

  • pkg/servers/process.go:154-208:
    • paper-* and purpur-* score 3
    • server.jar scores 2
    • every other .jar scores 0
  • The error at pkg/servers/process.go:205 says: no server jar found ... (expected paper-*.jar, purpur-*.jar, or server.jar).
  • docs/SERVER_MANAGER_UI.md previously claimed Fabric was recognized; PR docs: correct stale server, permission, and theme documentation #44 aligned the docs with the current generic-fallback behavior.

Impact

  • A folder containing both fabric-server-launch.jar and server.jar starts server.jar, not Fabric.
  • The error text gives Fabric users no hint that their jar is supported.
  • The server-manager spec's Fabric guidance is harder to follow.

Proposed fix

  • Add an explicit case for fabric-server-launch.jar in score.
  • Decide its priority relative to server.jar (same score or lower) and make the tie-break deterministic.
  • Include fabric-server-launch.jar in the "no server jar found" error.
  • Add tests for Fabric-only, Fabric+server.jar, and Fabric+paper.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions