Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,14 @@ public void startParkour(HypixelPlayer player) {
}

public void finishedParkour(HypixelPlayer player) {
Long startTime = perPlayerStartTime.get(player.getUuid()).startTime();
if (startTime == null) {
RunData runData = perPlayerStartTime.get(player.getUuid());
if (runData == null || runData.startTime() == null) {
player.sendMessage("§cYou haven't started the parkour challenge yet! Use §e/parkour start §cto start!");
return;
}

long startTime = runData.startTime();

int lastCheckpointIndex = perPlayerStartTime.get(player.getUuid()).lastCheckpointIndex();
if (lastCheckpointIndex != parkour.getCheckpoints().size() - 2) {
player.sendMessage("§cYou must go through all checkpoints before finishing the parkour challenge!");
Expand Down