diff --git a/pcbridge-paper/src/main/kotlin/com/projectcitybuild/pcbridge/paper/features/builds/commands/BuildsCommand.kt b/pcbridge-paper/src/main/kotlin/com/projectcitybuild/pcbridge/paper/features/builds/commands/BuildsCommand.kt index 66e41c93..8c0f39ea 100644 --- a/pcbridge-paper/src/main/kotlin/com/projectcitybuild/pcbridge/paper/features/builds/commands/BuildsCommand.kt +++ b/pcbridge-paper/src/main/kotlin/com/projectcitybuild/pcbridge/paper/features/builds/commands/BuildsCommand.kt @@ -26,7 +26,7 @@ class BuildsCommand( .then(command = buildMoveCommand) .then(command = buildVoteCommand) .then(command = buildDeleteCommand) - .redirect(buildListCommand.buildLiteral()) + .executes(buildListCommand.buildLiteral().command) .build() } } diff --git a/pcbridge-paper/src/main/kotlin/com/projectcitybuild/pcbridge/paper/features/builds/repositories/BuildRepository.kt b/pcbridge-paper/src/main/kotlin/com/projectcitybuild/pcbridge/paper/features/builds/repositories/BuildRepository.kt index c50e8a4a..ed5b62ac 100644 --- a/pcbridge-paper/src/main/kotlin/com/projectcitybuild/pcbridge/paper/features/builds/repositories/BuildRepository.kt +++ b/pcbridge-paper/src/main/kotlin/com/projectcitybuild/pcbridge/paper/features/builds/repositories/BuildRepository.kt @@ -95,7 +95,7 @@ class BuildRepository( if (cache == null) { fetchIdMap() } - val id = cache?.get(name) ?: throw Exception("Build not found") + val id = cache?.get(name) ?: throw IllegalStateException("Build not found") return buildHttpService.update( id = id, @@ -117,7 +117,7 @@ class BuildRepository( if (cache == null) { fetchIdMap() } - val id = cache?.get(name) ?: throw Exception("Build not found") + val id = cache?.get(name) ?: throw IllegalStateException("Build not found") buildHttpService.delete( id = id, @@ -130,7 +130,7 @@ class BuildRepository( if (cache == null) { fetchIdMap() } - val id = cache?.get(name) ?: throw Exception("Build not found") + val id = cache?.get(name) ?: throw IllegalStateException("Build not found") return buildHttpService.vote( id = id, diff --git a/pcbridge-paper/test/com/projectcitybuild/pcbridge/paper/features/staffchat/commands/ACommandTest.kt b/pcbridge-paper/test/com/projectcitybuild/pcbridge/paper/features/staffchat/commands/ACommandTest.kt index 291c258e..634c994d 100644 --- a/pcbridge-paper/test/com/projectcitybuild/pcbridge/paper/features/staffchat/commands/ACommandTest.kt +++ b/pcbridge-paper/test/com/projectcitybuild/pcbridge/paper/features/staffchat/commands/ACommandTest.kt @@ -1,6 +1,5 @@ package com.projectcitybuild.pcbridge.paper.features.staffchat.commands -import com.projectcitybuild.pcbridge.paper.Permissions import com.projectcitybuild.pcbridge.paper.core.libs.remoteconfig.services.RemoteConfig import com.projectcitybuild.pcbridge.http.models.pcb.RemoteConfigKeyValues import com.projectcitybuild.pcbridge.http.models.pcb.RemoteConfigVersion