Giter VIP home page Giter VIP logo

flowarg / nmsremaphelper Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 197 KB

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.

Home Page: https://plugins.gradle.org/plugin/fr.flowarg.nmsremaphelper

Java 100.00%
export gradle mappings nms obf plugins remap minecraft spigot

nmsremaphelper's Introduction

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 :

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.

Don't reload now your gradle project because it will crash. We need to populate the nmsremaphelper extension before!

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 with the --remapped argument!

Once it's done, you have to add two repositories to your project :

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 :

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!

nmsremaphelper's People

Contributors

flowarg avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.