Only consume daily Ring of the Star Sprite teleport if the teleport succeeds

This commit is contained in:
Player Name
2023-07-10 02:17:32 +00:00
committed by Ryan
parent d58d4857b0
commit c9e3ad4335
@@ -132,10 +132,11 @@ class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Com
} }
fun teleport(player: Player, star: ShootingStar){ fun teleport(player: Player, star: ShootingStar){
teleport(player, star.crash_locations[star.location]!!.transform(0, -1, 0), TeleportManager.TeleportType.MINIGAME) if (teleport(player, star.crash_locations[star.location]!!.transform(0, -1, 0), TeleportManager.TeleportType.MINIGAME)) {
getRingStoreFile()[player.username.toLowerCase()] = true getRingStoreFile()[player.username.toLowerCase()] = true
} }
} }
}
companion object { companion object {
private val star = ShootingStar() private val star = ShootingStar()