Spigot Build ID?

Discussion in 'Spigot Plugin Development' started by microsenix, May 27, 2016.

Thread Status:
Not open for further replies.
  1. Hello Guys,
    I am Developing a huge plugin with Auto-Update feature. Cause of this I need to know how to get the BuildID of the server. I can get it by the command "version", but with a lot of other stuff, how to get the ID/Number in a plugin?

    I mean this one (underlined):
    [21:09:48] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-550ebac-7019900 (MC: 1.8) (Implementing API version 1.8-R0.1-SNAPSHOT)
    [21:09:48] [Server thread/INFO]: Checking version, please wait...
    [21:09:50] [Thread-8/INFO]: You are 496 version(s) behind

    Thanks!


    Greetings,
    microsenix
     
  2. split it at Spigot- then get the first three digits of the split[1]
     
  3. @ProJoosh which function i have to split? I tried Bukkit.spigot(); but i don't think that's the right one.
     
  4. Get the Bukkit version, then split it at: "Spigot-" and you will get two strings
    split[0] = the thing before Spigot-
    split[1] = the thing after it

    Then you can get the first 3 characters of the split[1] and it will give you the id
     
  5. @ProJoosh
    Thanks for help, that's what i was looking for.
     
    • Friendly Friendly x 1
  6. Please mark this thread as solved to prevent confusion :)
     
    • Like Like x 1
    • Agree Agree x 1
Thread Status:
Not open for further replies.