Creating Custom Event

Discussion in 'Spigot Help' started by BruhMoment7575, Jan 20, 2020.

  1. Hello im fairly new to java and coding on spigot and was wondering how i could code my scenario i was planning on doing

    Scenario: I want players to have to kill a certain mob to then be able to pursue deeper into the map ( have barrier blocks deleted somehow or have something stop the players from moving forward without completing their objective) after they are done they have to hit this other mob in which a scoreboard will pop open and each hit someone inflicts gives them 100 points for their faction with first too 5000 points wins a closed off area where they are rewarded and only they are able to enter.

    would this be possible I'm hoping to learn all the code i can do accomplish something like this but was unable to find any tutorials that might help me in making this
     
    • Agree Agree x 1
  2. Strahan

    Benefactor

    As Twoaster said, you don't need custom events for this. It'd be pretty simple to do, you could just listen to EntityDamageByEntityEvent to track the damage to the mob and who is doing it to credit the appropriate team. You could then use PlayerMoveEvent to check if they are entering the protected area and disallow if they haven't met their goals.