Class ParkourRun

java.lang.Object
me.block2block.hubparkour.api.ParkourRun

public class ParkourRun extends Object
A parkour run to track player statistics.
  • Constructor Details

    • ParkourRun

      public ParkourRun(IHubParkourPlayer player)
      Initiates a brand-new parkour run with empty statistics.
      Parameters:
      player - the player who is doing this run.
  • Method Details

    • getTotalDistanceTravelled

      public double getTotalDistanceTravelled()
      Get the total distance travelled this run.
      Returns:
      the total distance travelled this run.
    • getPlayer

      public IHubParkourPlayer getPlayer()
      Get the player who is doing this parkour run.
      Returns:
      the player doing this parkour run.
    • getCheckpointsHit

      public int getCheckpointsHit()
      Get the amount of checkpoints the player has hit this run.
      Returns:
      the amount of checkpoints.
    • getJumps

      public int getJumps()
      Get the amount of times the player has jumped in this run.
      Returns:
      the amount of jumps.
    • checkpointHit

      public void checkpointHit()
      Executed when a checkpoint is hit.
    • jumped

      public void jumped()
      Executed when the player jumps.
    • addTravel

      public void addTravel(double distance)
      Executed when the player travels when doing the parkour.
      Parameters:
      distance - the distance travelled.