Class ParkourRun
java.lang.Object
me.block2block.hubparkour.api.ParkourRun
A parkour run to track player statistics.
-
Constructor Summary
ConstructorsConstructorDescriptionParkourRun(IHubParkourPlayer player) Initiates a brand-new parkour run with empty statistics. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTravel(double distance) Executed when the player travels when doing the parkour.voidExecuted when a checkpoint is hit.intGet the amount of checkpoints the player has hit this run.intgetJumps()Get the amount of times the player has jumped in this run.Get the player who is doing this parkour run.doubleGet the total distance travelled this run.voidjumped()Executed when the player jumps.
-
Constructor Details
-
ParkourRun
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
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.
-