Skip to content

Make compatible with Paper's plugin remapping. #23

@Jannyboy11

Description

@Jannyboy11

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions