Skip to content

Commit

Permalink
Hopefully let it work
Browse files Browse the repository at this point in the history
  • Loading branch information
Marten-Mrfc committed May 6, 2024
1 parent 30ce102 commit 621cd46
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import org.bukkit.WorldCreator

val server get() = Bukkit.getServer()

val nmsVersion = server.javaClass.getPackage().name
.split(".")[3].substring(1)
val nmsVersion = if (server.javaClass.getPackage().name.split(".").size > 3) {
server.javaClass.getPackage().name.split(".")[3].substring(1)
} else {
"" // default value
}

val splitNmsVersion = nmsVersion.split("_")
val nmsNumberVersion: Int = if (splitNmsVersion.size > 1) {
Expand Down

0 comments on commit 621cd46

Please sign in to comment.