Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flowarg/nmsremaphelper
This plugin provides some tasks to help you to export a plugin with correct mappings according to your spigot server version if you develop with a mojang mapped version of the NMS.
https://github.com/flowarg/nmsremaphelper
export gradle mappings minecraft nms obf plugins remap spigot
Last synced: 19 days ago
JSON representation
This plugin provides some tasks to help you to export a plugin with correct mappings according to your spigot server version if you develop with a mojang mapped version of the NMS.
- Host: GitHub
- URL: https://github.com/flowarg/nmsremaphelper
- Owner: FlowArg
- Created: 2022-07-12T23:54:32.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-16T22:17:55.000Z (over 2 years ago)
- Last Synced: 2024-11-23T10:43:28.435Z (3 months ago)
- Topics: export, gradle, mappings, minecraft, nms, obf, plugins, remap, spigot
- Language: Java
- Homepage: https://plugins.gradle.org/plugin/fr.flowarg.nmsremaphelper
- Size: 192 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# NMS Remap Helper
### Goal
This plugin targets Spigot Plugins developers who use the NMS classes.
This plugin allows you to use the remapped-mojang spigot jar as a dependency and develop your plugins with this jar.
This plugin exports your plugin mapped correctly according to your Spigot version (and your spigot server of course).### Usage
First, add the plugin to your project :
```gradle
plugins {
id 'fr.flowarg.nmsremaphelper' version '1.0.2'
}
```
It's possible that the version written in the README is not up-to-date. So make sure you have installed the latest plugin version.
Check that on the [Gradle Plugins Page](https://plugins.gradle.org/plugin/fr.flowarg.nmsremaphelper).Don't reload now your gradle project because it will crash.
We need to populate the `nmsremaphelper` extension before!```gradle
nmsremaphelper {
spigotVersion = "1.18.2-R0.1-SNAPSHOT"
}
```
Then, make sure the remapped jar is in the maven local repository.
- Go to your user directory
- Then, go to .m2, repository, org, spigotmc, spigot, spigot version. And make sure the file spigot-spigotversion-remapped-mojang.jar exists.
- If not, you have to execute the [BuildTools.jar](https://www.spigotmc.org/wiki/buildtools/) with the `--remapped` argument!Once it's done, you have to add two repositories to your project :
```gradle
repositories {
mavenCentral()
mavenLocal()
}
```
They are very common, so I think you should already have them written in the `repositories` block :).Then add the spigot remapped jar (which contains NMS classes!) to your dependencies :
```gradle
dependencies {
implementation 'org.spigotmc:spigot:spigotVersion:remapped-mojang'
}
```Then just call the `remapJar` gradle task and you'll find in your build/libs directory a filename-remap.jar file! This is the one you have to place it in the `plugins` folder of your spigot server instance.
If needed, you can also call the `remapMembers` gradle task and you'll find in your build/libs directory a filename-remap-members.jar file that map also methods and fields name. This is mandatory since 1.18.1 version of Spigot.
And all it's done!