AdvancementAPI - Create 1.12 Advancements!

Discussion in 'Spigot Plugin Development' started by 24763, May 14, 2017.

Thread Status:
Not open for further replies.
  1. I’m hoping to add some new things to API over time.
    • Winner Winner x 1
  2. yea when I have mine it doesnt look clean like that, they are literally stacked on top of eachother xD and I set parent. so idk xD

  3. I dont quite understand why all 3 of the advancements listed stack on each other xD

  4. electronicboy

    IRC Staff

    that method returns a new standard ArrayList, looks like google may have had their own implementation for older versions of java, now in 7+ they just use the oracle one.

    It also returns a standard ArrayList, no synchronization on it whatsoever, CME should be avoided in your own code, syncronised collections are as much of a curse as a blessing
  5. Choco


    As of Java 7, absolutely nothing due to the fact that diamond brackets no longer require the type parameters to be typed twice. See this thread as an example
    EDIT: Sniped... >.>
  6. Restart Your Server for me it deos Work, and You must Save The Advancement Files in each World who You have loadet.
  7. I restarted the server, didnt work

    But when I /reload it works. figure that.

    They are saved to the appropriate world and do award to the player (and are visible in all worlds). They are all in fact there just overlapping each other.

    after reload (no literally a restart didnt work for me xD), They worked either way, just overlapped each other. the reload fixed the visual layout xD. Although if the server restarts its back to that way again and has to be reloaded. I dont really get why the reload fixes it and a restart doesn't.


    #90 Fahlur, Jun 13, 2017
    Last edited: Jun 14, 2017
  8. Unsafe values seem to be a better opportunity here
  9. only thing is..
    Code (Text):

    public void loadAdvancement(){
         if(Bukkit.getAdvancement(getID()) == null){
           Bukkit.getUnsafe().loadAdvancement(getID(), getJSON());
  10. Has anyone thought about making a plugin (that could also be integrated in the API) to make this user-friendly? I think I could easily write some code to load custom achievements from a config file and add some commands to make things easy to manage for server owners that do not have a Java programmer.
  11. I’ve got that planned, to make a entire plugin.
  12. In fact I'm using this to make an unusual system of notifications.
  13. :eek: such as?
    • Agree Agree x 1
  14. This one:

    The advancement has it's unique ID and is saved at specific Map<String, AdvancementAPI> at other class. The thing is that though it's registered for only one second and then unregistered the server should be restarted in order to apply the changes. So I've solved it by marking each advancement there as [%PLAYER%_%STREAMNAME%]

    PS the message says that a user started his stream called "Играем в кубач"
    PPS also pull-request'ed my changes for this functionality
    • Creative Creative x 1
  15. Oh wow :eek: that’s pretty cool can’t lie, might build something similar to this as a plugin
  16. If only i was able to figure out how to pull this all together and make a few custom things for our server, like .. 'visited all the worlds', and 'bought a spawner from our shop',.. 'ranked up four times'.. whatever.. making it up as i go.
  17. :eek: oo xD all possible somehow ;)
Thread Status:
Not open for further replies.