1.12.2 What API Version Do I Specify For 1.12.2?

Discussion in 'Spigot Plugin Development' started by JusToastYT, Jun 14, 2021.

  1. name: mmoskyblock
    version: 1.0.0
    author: JusToastYT
    main: com.justoastyt.mmoskyblock.mmoskyblock
    api-version: 1.12.2
    is what it currently looks like, is this fine?
     
  2. The api-version key wasn't added until 1.13. If you don't care about your plugin supporting newer versions than 1.12, you can just ignore adding an api-version entry since it won't do anything. If you are going to want to support versions higher than 1.12, you probably want to use api-version: 1.13
     
    • Agree Agree x 5
  3. api-version has been added since version 1.13
     
  4. There is no need of using this. I recommend you don't use.
     
    • Funny Funny x 3
    • Optimistic Optimistic x 1
  5. Thanks!
     
  6. hey, i have seen plugins that support from 1.8 all the way upto 1.16, but how? as i set my api version to 1.13, it worked for older versions but not for above, then how they do it?
     
  7. „api-version: 1.13“ definitely works for all versions above 1.13, just see the plugin.yml on any of my plugins, they all support 1.17
     
  8. do you have source available?
     
  9. No
     
  10. https://github.com/JEFF-Media-GbR/Spigot-ChestSort
    https://github.com/JEFF-Media-GbR/Spigot-AngelChestPlus
    https://github.com/JEFF-Media-GbR/Spigot-BestTools
    https://github.com/JEFF-Media-GbR/BetterTridents
    https://github.com/JEFF-Media-GbR/Spigot-Drop2InventoryPlus
    https://github.com/JEFF-Media-GbR/Spigot-InvUnloadPlus

    and many more, you only have to click on my profile and go to "Resources", nearly every plugin I uploaded has the sources available :) I always specify "api-version: 1.13". It's no problem for versions above 1.13 and it also doesn't hurt for pre 1.13 Spigot versions. Only problem you can get is if you specify something else than "1.13" - e.g. if you say "api-version: 1.14", it doesn't work in 1.13, and so on, or if you do not specify an API version but use "new" material names (1.13+), so:

    just always use "api-version: 1.13" and you are fine. (Might change in the future, though)

    (Edit: If you use material names only available in 1.16 for example, the plugin might not work in 1.13 or something, which is why I tend to use "Enums.getIfPresent(Material.class, "MATERIAL_NAME").orNull()" and then just check if it's null
     
    #10 mfnalex, Jun 15, 2021
    Last edited: Jun 15, 2021
  11. Bro why do you always write so unneccessary, totally unuseful answers? They clearly quoted my post, noone cares if your plugins are open source
     
    • Agree Agree x 2
  12. do you have source available? I answered No because I didn't know what the source code was. Is there any problem?
     
  13. the problem is you didn't read. "do you have source available" was not written to you. it was in response to mfnalex. you're answering someone else's question.
     
    • Agree Agree x 1