paper-nms-maven-plugin
A maven plugin for using NMS on paper with Mojang mappings.
This plugin will both create the mapped paper dependency and install it to your local repository, and remap your artifact back to spigot mappings.
Note: Only works for 1.18.x at the moment, see below.
Note: This maven plugin is not on any repository, see below.
Usage (IntelliJ)
-
Add
.paper-nms
to your.gitignore
. -
Add the plugin to your
pom.xml
:
<build>
<plugins>
...
<plugin>
<groupId>ca.bkaw</groupId>
<artifactId>paper-nms-maven-plugin</artifactId>
<version>0.1-SNAPSHOT</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
</execution>
</executions>
</plugin>
...
</plugins>
</build>
- Add the mojang mapped dependency to your
pom.xml
.
<dependency>
<groupId>ca.bkaw</groupId>
<artifactId>paper-nms</artifactId>
<version>1.18.1-SNAPSHOT</version>
</dependency>
Change 1.18.1
to the desired version. Note: Only 1.18.1 works at the moment.
- Reload the project.
A Cannot resolve ca.bkaw:paper-nms:1.18.1-SNAPSHOT
message is expected.
-
To create the missing dependency, run
init
. For arrow (4), double-clickpaper-nms:init
to run it. -
Wait for
init
to finish and aBUILD SUCCESS
message should appear. Thepaper-nms
dependency should now exist. -
Done! Your project should now have a Mojang mapped paper dependency, and when you build you project (for example with
mvn package
) the artifact will be remapped back to spigot mappings.
Issues
Only works for 1.18.x.
On 1.17.1 unresolvable mapping conflicts occur, if you want to help try to fix the issue, see issue #1.
On some older spigot versions, mappings use a package rename to avoid having to retype net/minecraft/server
for every class mapping. See issue #2.
In the future all versions down to 1.14.4 should be supportable as there are Mojang mappings available since then.
No maven repository
This maven plugin is currently not on any repository. Instead, git clone this repository and run mvn install
to install the plugin to your local repository.
Disclaimer
Please bear the licence of the Mojang mappings in mind.
Not affiliated with Minecraft, Mojang or Microsoft.
Not affiliated with Paper or PaperMC.
Not affiliated with Maven or The Apache Software Foundation.