diff --git a/gradle.properties b/gradle.properties index b6a6fa3..eeee166 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ kotlin.code.style=official kotlin.stdlib.default.dependency=false org.gradle.parallel=true -version=3.3.0-SNAPSHOT \ No newline at end of file +version=3.3.1-SNAPSHOT \ No newline at end of file diff --git a/src/main/kotlin/dev/slne/surf/essentials/command/WorldCommand.kt b/src/main/kotlin/dev/slne/surf/essentials/command/WorldCommand.kt index 0ab8bf9..9010fb8 100644 --- a/src/main/kotlin/dev/slne/surf/essentials/command/WorldCommand.kt +++ b/src/main/kotlin/dev/slne/surf/essentials/command/WorldCommand.kt @@ -302,6 +302,7 @@ fun worldCommand() = commandTree("world") { } literalArgument("list") { + withPermission(EssentialsPermissionRegistry.WORLD_COMMAND_LIST) anyExecutor { executor, _ -> val worlds = Bukkit.getWorlds() @@ -322,7 +323,7 @@ fun worldCommand() = commandTree("world") { primary("Geladene Welten".toSmallCaps(), TextDecoration.BOLD) } - rowRenderer { row, index -> + rowRenderer { row, _ -> listOf( buildText { darkSpacer(">") diff --git a/src/main/kotlin/dev/slne/surf/essentials/service/WorldService.kt b/src/main/kotlin/dev/slne/surf/essentials/service/WorldService.kt index 37e805f..c1e4979 100644 --- a/src/main/kotlin/dev/slne/surf/essentials/service/WorldService.kt +++ b/src/main/kotlin/dev/slne/surf/essentials/service/WorldService.kt @@ -80,6 +80,10 @@ object WorldService { return } + world.setGameRule(GameRules.LOCATOR_BAR, false) + world.setGameRule(GameRules.ADVANCE_TIME, false) + world.setGameRule(GameRules.ADVANCE_WEATHER, false) + sender.sendText { appendSuccessPrefix() success("Die Welt ") @@ -136,7 +140,8 @@ object WorldService { } suspend fun unload(sender: CommandSender, world: World) { - val overworld = Bukkit.getWorlds().firstOrNull() ?: throw CommandAPI.failWithString("Es gibt keine Overworld") + val overworld = Bukkit.getWorlds().firstOrNull() + ?: throw CommandAPI.failWithString("Es gibt keine Overworld") val overworldSpawn = withContext(plugin.globalRegionDispatcher) { overworld.spawnLocation } sender.sendText { @@ -185,7 +190,8 @@ object WorldService { @OptIn(ExperimentalPathApi::class) suspend fun delete(sender: CommandSender, world: World) { - val overworld = Bukkit.getWorlds().firstOrNull() ?: throw CommandAPI.failWithString("Es gibt keine Overworld") + val overworld = Bukkit.getWorlds().firstOrNull() + ?: throw CommandAPI.failWithString("Es gibt keine Overworld") val spawnLocation = withContext(plugin.globalRegionDispatcher) { overworld.spawnLocation } val semaphore = Semaphore(64)