Solved Updating Plugin to 1.15.2

Discussion in 'Spigot Plugin Development' started by Variant-, Jan 23, 2020.

  1. Hi everyone,

    I'm a brand new 'plugin developer' and this is my first time experiencing a version update where I will need to update my work. I have been searching for guides on how to update my plugin both efficiently, correctly, and comprehensively but I have not found anything relevant at this time, therefore, I am reaching out to the community.

    I was wondering what other developers are doing to update your plugins? I know I will need the new Spigot JAR from BuildTools (which I have already gotten) but what are my next steps to fully get my plugin back up on the new version of Spigot.

    Any help would be greatly appreciated. Thank you!
  2. If there are no method changes that impact your work, you pretty much just update Spigot to the latest build/release. In my case for Maven, that's literally changing a 1 to a 2.
  3. If you are using only Bukkit (not CraftBukkit and/or NMS), you can build your plugin against older versions and it will still work in most cases.
    If you are using Maven, you simply need to change the version in your <dependency> node. This will enable you to use the new features and change any deprecated ones.

    If you are using NMS / CraftBukkit, the whole thing gets more tricky. The reason is that he package-identifier changes from update to update, and parts of the code might as well.
    There are a couple of solutions to some of the problems, but there are threads that discuss this topic way better than I could, so you should look into that. The keywords are adapters, getting the version number via reflection, using APIs, e.t.c.
  4. Seems pretty straight forward. Thank you!

    I understand what you're saying, however, as a new developer most guides have directed me to add the Spigot JAR as a library to my project so I've never used Maven to add Spigot as a dependency. I found the instructions on adding Spigot to my pom.xml for compiling with Maven. If you don't mind me asking, is there anything else I would need to do to use Maven? Do I still need to have the Spigot JAR in my project library?

    I apologize if this isn't the correct forum for asking these questions, or if I seem uneducated in this process.
  5. If you use Maven, there is no need to download the spigot.jar; maven does that automatically for you.
    Depending on the IDE you are using, setting up maven can be hard or easy. I have used both Eclipse and IntelliJ. For IntelliJ, this is really simple; Eclipse was a little harder, but then that was the case a year ago or so, so that might have changed...
  6. Perfect! Thank you for you help!