Skip to content

Commit

Permalink
apply review
Browse files Browse the repository at this point in the history
  • Loading branch information
rito528 committed Dec 21, 2023
1 parent 29d28e1 commit 03fc188
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.bukkit.Bukkit
import org.bukkit.Location

fun Location.toSpawnPoint() =
world?.let { SpawnPoint(it.name, LocX(x), LocY(y), LocZ(z), Yaw(yaw), Pitch(pitch)) }
SpawnPoint(world!!.name, LocX(x), LocY(y), LocZ(z), Yaw(yaw), Pitch(pitch))

fun SpawnPoint.toBukkitLocation() = Bukkit.getWorld(worldName)?.let { world ->
Location(world, x.value, y.value, z.value, yaw.value, pitch.value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ object Update : CommandExecutor("update", "スポーン地点の設定を現在
}

val spawnPoint = sender.location.toSpawnPoint()
if (spawnPoint != null) {
SPAWN_POINT_PERSISTENCE.save(spawnPoint)
}
SPAWN_POINT_PERSISTENCE.save(spawnPoint)

val updatedMessage = "スポーン地点の設定を更新しました。"
messageSender.info(updatedMessage)
Expand Down

0 comments on commit 03fc188

Please sign in to comment.