Skip to content

feat: enhance entry-point class handling and update documentation#48

Merged
Statsly-org merged 1 commit into
masterfrom
fix/preserve-entrypoint
Apr 21, 2026
Merged

feat: enhance entry-point class handling and update documentation#48
Statsly-org merged 1 commit into
masterfrom
fix/preserve-entrypoint

Conversation

@Statsly-org
Copy link
Copy Markdown
Owner

Summary

  • Prevents renaming of classes referenced as entrypoints in:
    • plugin.yml (main)
    • paper-plugin.yml (main, bootstrapper, loader)
    • bungee.yml (main)
    • velocity-plugin.json (main)
    • MANIFEST.MF (Main-Class, Premain-Class, Agent-Class)
  • Entry-point classes are only excluded if the referenced class exists in the JAR (including inner classes via $).

Implementation notes

  • Added EntryPointDiscoverer to extract entrypoint class names from JAR resources/manifest.
  • Merged discovered entrypoints with config.excludeClasses() and used the merged list for:
    • ClassMapping
    • MethodMapping
    • FieldMapping
  • Added a log line listing preserved entrypoint classes when detected.

Test plan

  • Build a sample Paper plugin with plugin.yml and/or paper-plugin.yml containing main/bootstrapper/loader.
  • Obfuscate with class renaming enabled.
  • Verify the entrypoint class names remain unchanged and the plugin loads on a Paper server.

Files changed

  • src/main/java/st3ix/obfuscator/core/EntryPointDiscoverer.java
  • src/main/java/st3ix/obfuscator/core/ObfuscationPipeline.java
  • src/main/java/st3ix/obfuscator/gui/ObfuscatorGui.java (UI hint text)
  • README.md, Features.md (docs)

Closes #47

@Statsly-org Statsly-org self-assigned this Apr 21, 2026
@Statsly-org Statsly-org added the bug Something isn't working label Apr 21, 2026
@Statsly-org Statsly-org merged commit c49a04e into master Apr 21, 2026
1 check passed
@Statsly-org Statsly-org deleted the fix/preserve-entrypoint branch April 21, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin entrypoint classes get renamed (plugin.yml / paper-plugin.yml)

1 participant