Multiple versions?

Discussion in 'Plugin Development' started by Nutowen, Jan 30, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    Nutowen

    If I have a plugin which uses the 1.8 API. But the server can be played on 1.9/10/11 lets say. How would I adapt my plugin to work on those versions? Make sure it works and doesn't mess up. If I do 1.8 it wont be able to do things in 1.10 with new blocks etc. I'm very confused and have no code to show. I have a project but I don't know how to make it work for multiple versions. I hope someone can help.
     
  2. Offline

    timtower Administrator Administrator Moderator

    @Nutowen Depends on what the plugin does.
    Depends on what it needs to do.
    Could you tell that?
     
  3. Offline

    Nutowen

    I have probably done many posts on here about my prison plugin. Mine a block, auto smelts and goes into inventory. I have also implement worldguard so they can break the prison walls cause worldguard was messing up. We are using purpur on the prison walls and there not in 1.8 i dont think. Also I would need multiple versions of worldguard? In my build path?
     
  4. Offline

    OTF Catastrophe

    I've never really seen it happen but if you import the 1.8 api into your plugin, theres a good chance that it'll work on 1.9+ servers as well. This can also be achievable by importing all the versions you want the plugin to be ran on, and seeing if there is any compilation errors. If there isn't, then you're all set and you can remove all the versions except for 1.8 because you know now that there won't be any issues.

    The last example isn't the most trustworthy way though. Not sure if anyone else has another one they'd like to suggest.
     
  5. Offline

    Zombie_Striker

    @OTF Catastrophe
    Not for NMS.

    @Nutowen
    For most of the bukkitapi, nothing much has changed since 1.8. For the things that did, use Reflection. There are plenty of utils and tutorials out there.
     
Thread Status:
Not open for further replies.

Share This Page