diff --git a/gradle.properties b/gradle.properties index 1f2d45d..b55de6e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ kotlin.code.style = official minecraftVersion = 1.17 pluginName = Authy -pluginVersion = 3.1.2 +pluginVersion = 3.1.3 diff --git a/src/main/kotlin/me/iru/process/JoinProcess.kt b/src/main/kotlin/me/iru/process/JoinProcess.kt index cf0b1f4..183e8bf 100644 --- a/src/main/kotlin/me/iru/process/JoinProcess.kt +++ b/src/main/kotlin/me/iru/process/JoinProcess.kt @@ -46,12 +46,14 @@ class JoinProcess(private val player: Player) { val x = authy.config.getDouble("onFirstJoin.x") val y = authy.config.getDouble("onFirstJoin.y") + 0.1 val z = authy.config.getDouble("onFirstJoin.z") - player.teleport(Location(player.world, x, y, z)) + val world = authy.config.getString("onFirstJoin.world") ?: "world" + player.teleport(Location(authy.server.getWorld(world), x, y, z)) } else if(authy.config.getBoolean("onJoin.teleport")) { val x = authy.config.getDouble("onJoin.x") val y = authy.config.getDouble("onJoin.y") + 0.1 val z = authy.config.getDouble("onJoin.z") - player.teleport(Location(player.world, x, y, z)) + val world = authy.config.getString("onJoin.world") ?: "world" + player.teleport(Location(authy.server.getWorld(world), x, y, z)) } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index c0938c0..961f536 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -31,6 +31,7 @@ onFirstJoin: x: 0 y: 0 z: 0 + world: world onJoin: # Concealment if set to true (also requires teleport to be true) will teleport a player to their position after authentication @@ -39,6 +40,7 @@ onJoin: x: 0 y: 0 z: 0 + world: world duplicateIpProtection: # 0 - No protection