Skip to content

Commit 38ecc0e

Browse files
committed
Remove documentation that we don't support mojang mapped servers
1 parent c4878fd commit 38ecc0e

File tree

1 file changed

+0
-107
lines changed

1 file changed

+0
-107
lines changed

docssrc/src/setup_shading.md

Lines changed: 0 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -107,39 +107,6 @@ By default, the CommandAPI is written in the `dev.jorel.commandapi` package. It
107107

108108
-----
109109

110-
## A note about Paper 1.20.5+ servers
111-
112-
_If you are using the Spigot API, you can ignore this section and jump to [Shading with Maven](#shading-with-maven) or [Shading with Gradle](#shading-with-gradle)
113-
depending on the build tool you use._
114-
115-
<div class="warning">
116-
117-
**Developer's Note:**
118-
119-
Starting from Minecraft version 1.20.5, Paper will only ship mojang-mapped servers which use mojang-mapped class names and CraftBukkit classes without the version package.
120-
However, when starting the server, Paper will remap Spigot-mapped plugins so that they can run on a mojang-mapped server.
121-
122-
At this time, the CommandAPI is not able to provide a version that runs on a mojang-mapped server without being relocated so your plugin has to be marked as Spigot-mapped
123-
to make the server remap your plugin and your shaded CommandAPI version so that the CommandAPI is able to run on a 1.20.5 Paper server.
124-
125-
</div>
126-
127-
In the following section we distinguish between the use of the `Paper API`, in our context just the use of the `io.papermc.paper:paper-api:apiVersion` dependency
128-
without Paper's internal code ("NMS"), and the use of `paperweight-userdev` (Paper's internal code) because the use of either of them will decide what you have to
129-
do to make your plugin with the CommandAPI 1.20.5 Paper-compatible.
130-
131-
You now need to differentiate between certain configurations in order to make your plugin and the CommandAPI compatible with 1.20.5 servers:
132-
133-
| Build Tool | Paper | Plugin Flavour | What to do |
134-
|------------|------------------------|-------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
135-
| Maven | Paper API | `plugin.yml` | [Shading with Maven](#shading-with-maven) |
136-
| Maven | Paper API | `paper-plugin.yml` | <ol><li><a href="#shading-with-maven">Shading with Maven<a/></li><li><a href="#setting-the-manifest-value-maven">Setting the manifest value (Maven)</a></li></ol> |
137-
| Gradle | Paper API | `plugin.yml` | [Shading with Gradle](#shading-with-gradle) |
138-
| Gradle | Paper API | `paper-plugin.yml` | <ol><li><a href="#shading-with-gradle">Shading with Gradle</a></li><li><a href="#setting-the-manifest-value-gradle">Setting the manifest value (Gradle)</a></li></ol> |
139-
| Gradle | `paperweight-userdev` | `plugin.yml`<br>`paper-plugin.yml` | [Shading with Gradle (`paperweight-userdev`)](#shading-with-gradle-paperweight-userdev) |
140-
141-
-----
142-
143110
## Shading with Maven
144111

145112
To shade the CommandAPI into a maven project, you'll need to use the `commandapi-bukkit-shade` dependency, which is optimized for shading and doesn't include plugin-specific files _(such as `plugin.yml`)_. **You do not need to use `commandapi-bukkit-core` if you are shading**:
@@ -292,77 +259,3 @@ gradlew build shadowJar
292259
```
293260

294261
As we're shading the CommandAPI into your plugin, we **don't** need to add `depend: [CommandAPI]` to your `plugin.yml` file.
295-
296-
-----
297-
298-
## Setting the manifest value (Maven)
299-
300-
> **Developer's Note:**
301-
>
302-
> This step is only necessary when targeting Paper servers while using a `paper-plugin.yml`
303-
304-
In order to tell Paper that your plugin should be remapped to Mojang mappings at runtime, you have to set a manifest value in the `maven-jar-plugin`. This step is necessary as
305-
Paper assumes that every plugin using a `paper-plugin.yml` already is mojang-mapped.
306-
307-
```xml
308-
<plugin>
309-
<groupId>org.apache.maven.plugins</groupId>
310-
<artifactId>maven-jar-plugin</artifactId>
311-
<version>3.4.1</version>
312-
<configuration>
313-
<archive>
314-
<manifestEntries>
315-
<paperweight-mappings-namespace>spigot</paperweight-mappings-namespace>
316-
</manifestEntries>
317-
</archive>
318-
</configuration>
319-
</plugin>
320-
```
321-
322-
This will mark your plugin as Spigot-mapped and Paper will remap your plugin at runtime.
323-
324-
## Setting the manifest value (Gradle)
325-
326-
> **Developer's Note:**
327-
>
328-
> This step is only necessary when targeting Paper servers while using a `paper-plugin.yml`
329-
330-
In order to tell Paper that your plugin should be remapped to Mojang mappings at runtime, you have to set a manifest value in the `shadowJar` task. This step is necessary as
331-
Paper assumes that every plugin using a `paper-plugin.yml` already is mojang-mapped.
332-
333-
```kotlin
334-
tasks.withType<ShadowJar> {
335-
manifest {
336-
attributes["paperweight-mappings-namespace"] = "spigot"
337-
}
338-
}
339-
```
340-
341-
This will mark your plugin as Spigot-mapped and Paper will remap your plugin at runtime.
342-
343-
## Shading with Gradle (`paperweight-userdev`)
344-
345-
> **Developer's Note:**
346-
>
347-
> This section assumes that you already have a project using `paperweight-userdev` set up.
348-
349-
<div class="warning">
350-
351-
When using `paperweight-userdev`, building your plugin using the `shadowJar` task is not recommended since that task builds the mojang-mapped jar but does not remap any dependencies
352-
you may have.
353-
354-
Because of that, the Paper server will see your plugin as mojang-mapped and will not try to remap your plugin resulting in a `NoClassDefFoundError` when calling the CommandAPI's
355-
`onLoad` method because this uses the versioned CraftBukkit classes while a Paper server doesn't have those anymore.
356-
357-
</div>
358-
359-
Instead, please follow these instructions to be able to run the CommandAPI while having made your plugin using `paperweight-userdev`:
360-
361-
1. Please add this to your build script:
362-
363-
```kotlin
364-
paperweight.reobfArtifactConfiguration = ReobfArtifactConfiguration.REOBF_PRODUCTION
365-
```
366-
367-
2. Only run the `reobfJar` task to build your plugin from now on. The main plugin artifact will be Spigot mapped and Paper will remap your plugin so that in the end
368-
running the CommandAPI works.

0 commit comments

Comments
 (0)