Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kotlin.code.style=official
kotlin.stdlib.default.dependency=false
org.gradle.parallel=true
version=3.3.0-SNAPSHOT
version=3.3.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ fun worldCommand() = commandTree("world") {
}

literalArgument("list") {
withPermission(EssentialsPermissionRegistry.WORLD_COMMAND_LIST)
anyExecutor { executor, _ ->
val worlds = Bukkit.getWorlds()

Expand All @@ -322,7 +323,7 @@ fun worldCommand() = commandTree("world") {
primary("Geladene Welten".toSmallCaps(), TextDecoration.BOLD)
}

rowRenderer { row, index ->
rowRenderer { row, _ ->
listOf(
buildText {
darkSpacer(">")
Expand Down
10 changes: 8 additions & 2 deletions src/main/kotlin/dev/slne/surf/essentials/service/WorldService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Comment thread
TheBjoRedCraft marked this conversation as resolved.

sender.sendText {
appendSuccessPrefix()
success("Die Welt ")
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down