Solved Reset phantom counter

Discussion in 'Spigot Plugin Development' started by MrGeneralQ, Mar 14, 2020.

  1. MrGeneralQ

    MrGeneralQ Previously qintinator

    Good afternoon everyone

    is there a way to reset the amount of phantoms spawning at night for the player?
  2. drives_a_ford


    If all you want to do is make the phantoms not appear (as if you had slept), then all you need to do is Player#setStatistic and set the Statistic.TIME_SINCE_REST to 0.

    If you wish to limit the amount of phantoms spawning, then you might get away with changing the statistic to a number greater than 0. I'm not sure what the number would be (nor whether or not it works this way specifically). You can just play with it.
    • Useful Useful x 1
  3. MrGeneralQ

    MrGeneralQ Previously qintinator

    The player.setStatistics() is the one I was looking for. As always, you have been a great help. thank you!