-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix repeated checkpoint setting + bypass teleport check for back-to-c…
…heckpoint teleports + fix replacing checkpoints with the pressure plate (#14) * add currentlyTeleporting field to the run manager * update listeners use currentlyTeleporting to ensure only players teleported by the plugin (for respawning at checkpoint) will be allowed to continue their run refactor uuid use more descriptive names for locations change checkpoint store to use block locations, so comparisons can more accurately be made * increase location mock to make tests pass * stop adding 0.5x ?y 0.5z on teleport to warpspot. also correctly replace exisitng warps on placement of further pressure plates instead, the conversion from block location (on pressure plate place) to player location (on teleport) is done just for that one path * make teleport async
- Loading branch information
Showing
9 changed files
with
78 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
package world.bentobox.parkour; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.UUID; | ||
|
||
import org.bukkit.Location; | ||
|
||
public record ParkourRunRecord(Map<UUID, Location> checkpoints, Map<UUID, Long> timers) { | ||
public record ParkourRunRecord(Map<UUID, Location> checkpoints, Map<UUID, Long> timers, List<UUID> currentlyTeleporting) { | ||
/** | ||
* Clears any current times or checkpoints | ||
* @param uuid UUID of runner | ||
*/ | ||
public void clear(UUID uuid) { | ||
checkpoints.remove(uuid); | ||
timers.remove(uuid); | ||
currentlyTeleporting.remove(uuid); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.