Discussion in 'Spigot Plugin Development' started by Bravecity, May 3, 2015.

  1. Hello i am having trouble making custom achievements like hypixel and the hive.
  2. gigosaurus


    What code do you have so far, or are you actually asking how you would go about creating this?
  3. How i would go about it, im confused on how i would do it. Like i want to give a player an achievement for killing a zombie with a name
  4. gigosaurus


    You will need to detect when an achievement has been unlocked, and a way to store all the achievements a player has, plus a way to interact with this storage to get/set unlocked achievements.

    For detecting the achievement you gave as an example, you would listen to an event such as the EntityDeathEvent to determine when a player has killed a zombie which has a name.

    For storing the achievement, you could either do it in a database or a file. You would make a record of the player having unlocked this achievement, which you can then access when needed.
  5. Ok thanks
  6. are u using them through bungee or bukkit?
  7. This is super easy if you log how many of something that player has done. e.g. if(p.isOpped) or what ever it is then give them moneys and set something in config that is true that they have unlocked that achievement and also don't forget to do checks before you give the achievement to see if they already have gotten it.

    (I'm tired, bye)