like Warden mob in minecraft, Spigot Warden obscures what surrounds you
Since 1.17 spigot has started to "obfuscate" the nms classes so it is more complicated to use them because understanding what a(), b() or even aF() or af() does takes time, since this version spigot has also added the suffix '--remapped' when generating spigot with buildTools, EVERYTHING IS CLEARER! Unfortunately the servers can't read the plugins using the "Remapped" version of spigot and well here comes "Spigot Warden" which generates your plugin.jar but in a language understandable and compatible with your server!
" which sorcery should I use ? "
To add it to your plugin you have to use gradle and add this line to your build.gradle
plugins {
id "io.github.shayf0x.spigotwarden" version "1.0"
}
Then you can configure the gradle plugin by adding these parameters:
SpigotWarden {
setMinecraftVersion("1.19-R0.1-SNAPSHOT") //this set targeted spigot version (if not specified, default value: "1.19-R0.1-SNAPSHOT")
setBuildOutput(file('<path to my server>/plugins')) //this set Output directory (if not specified, default value: "<your plugin project>/build/libs")
}
Which this plugin you can generate remapped spigot with buildTools' Task. This task will also generate the necessary files to use the plugin and if the files are missing, it will be automatically launched.
buildTools
: this task generate Spigot remapped and all file necessary forremapJar
taskremapJar
: this task build, obfuscate and deObfuscate your plugin to make it compatible with your serverssetup
: this task test and download all files necessary for SpecialSource and this plugin (it is automatically run beforeremapJar
task)
This plugin allows you to translate the methods and classes of spigot-remapped so that the spigot.jar of your servers can read them, so you have to add the spigot-remapped library to your jar like this
dependencies {
implementation 'org.spigotmc:spigot:<spigotVersion>:remapped-mojang'
}
and add this two repository:
repositories {
mavenCentral()
mavenLocal()
}
You can now easily develop your plugin and create the plugin.jar with the remapJar
task!
(An example is available in this reference)