Using NMS in Paper


I’m using Paper to develop minecraft plugins in intellij. I’ve installed it using the intellij Minecraft plugin.
However, I cannot use any NMS stuff because the net.minecraft… package simply doesn’t exist.
This is the Maven code in the pom.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=""







What is the best way to add support for NMS?

Well that is because you are only including the api as a dependency. (Hence the paper-api in your dependencies).

Since the server code cannot be hosted online, you have to clone the repository from github and run ./paper install to install the nms code into your local m2 repository. Then remove the -api part of the dependencies and remove the repository from pom.xml and re-import your maven project.

1 Like

Thank you for your answer! How does this work on a Windows computer? I have successfully executed ./paper install in the Linux subsystem, but it’s not installed in my local Windows m2 repository. How would that work?

With 1.16.4 you can use this command:
java -Dpaperclip.install=true -jar paperclip.jar

Where do I run that command? Where is the paperclip.jar?

It’s just the normal download from

Thanks for your help, but I’m just getting errors after errors. It did get imported into my local m2 repository, but now there are problems with the dependencies in intellij.

Just use the scripts, ./paper p and then mvn clean install, the paperclip install stuff only works once you’ve installed the stuff locally for the current version

The command mvn clean install doesn’t work. I’m getting that error:

Did you run “./paper patch” first?

Yep, I’ve tried ./paper patch, ./paper p and ./paper install. All of those finished without any errors.

EDIT: I ran these commands in linux, then I copied the new Paper folder into windows to run that mvn command.

that’s why you’re getting the error, the scripts install stuff like the minecraft-server jar that it’s complaining about

Where are the scripts installing those things into? I’m moving the whole Paper folder from Linux to Windows, so if it gets installed into that folder, shouldn’t it be fine?

the minecraft-server jar is installed to the local maven repo

Ahh okay. Well I also ran java -Dpaperclip.install=true -jar paperclip.jar which worked just fine, so it should be in my local maven repo by now, right? So how do I make it work in intellij? Changing spigot-api to spigot and removing the repository gives me a bunch of weird errors, for example this:


When I run that command, it fails with Error: Could not find or load main class .install=true

-D"…"=true or something, pretty sure some OS was misparsing that flag

Sounds like you wrongly copied/pasted it, probably added space after paperclip and before .install=true.

Double check your command or try: java "-Dpaperclip.install=true" -jar paperclip.jar