Skip to content

Commit 29aa62f

Browse files
committed
Fix end platform bug
1 parent c15231d commit 29aa62f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

type.lobby/src/main/java/net/swofty/type/lobby/parkour/LobbyParkourManager.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,14 @@ public void startParkour(HypixelPlayer player) {
129129
}
130130

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

138+
long startTime = runData.startTime();
139+
138140
int lastCheckpointIndex = perPlayerStartTime.get(player.getUuid()).lastCheckpointIndex();
139141
if (lastCheckpointIndex != parkour.getCheckpoints().size() - 2) {
140142
player.sendMessage("§cYou must go through all checkpoints before finishing the parkour challenge!");

0 commit comments

Comments
 (0)