Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make compatible with Paper's plugin remapping. #23

Open
Jannyboy11 opened this issue Feb 12, 2024 · 1 comment
Open

Make compatible with Paper's plugin remapping. #23

Jannyboy11 opened this issue Feb 12, 2024 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@Jannyboy11
Copy link
Owner

Jannyboy11 commented Feb 12, 2024

Paper's plugin classloader soon will use bytecode modification to remap plugins. I think it performs the following two modifications:

  • Remove craftbukkit version from nms classes.
  • Remap plugins that use nms to use mojang-mapped classes instead of obfuscated-mapped classes.

ScalaLoader's plugin bytecode transormer should apply the same transformations, it should call ReflectionRemapper and PluginRemapper to apply their transformations. I think this is best done in Platform.java; a PaperPlatform could be implemented which extends from Platform. A new constant for this platform will be added too, and Platform#detect shall be updated.
A note on calling the reflection remapper; it should be called with Paper's ASM dependency, not ScalaLoader's.

See: https://github.com/PaperMC/testing/releases/tag/no-relocation,
Discord announcement: https://discord.com/channels/289587909051416579/1077385604012179486/1206605416012976178

@Jannyboy11
Copy link
Owner Author

Paper 1.20.5 now includes these new remapping changes, meaning this is now more urgent than before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant