{ - - fun checkPermission(player: P, permission: String): Boolean - -} \ No newline at end of file diff --git a/connection-shared/src/main/kotlin/app/simplecloud/plugin/connection/shared/ServerConnectionPlugin.kt b/connection-shared/src/main/kotlin/app/simplecloud/plugin/connection/shared/ServerConnectionPlugin.kt deleted file mode 100644 index 5d87c1c..0000000 --- a/connection-shared/src/main/kotlin/app/simplecloud/plugin/connection/shared/ServerConnectionPlugin.kt +++ /dev/null @@ -1,83 +0,0 @@ -package app.simplecloud.plugin.connection.shared - -import app.simplecloud.plugin.connection.shared.config.CommandConfig -import app.simplecloud.plugin.connection.shared.config.ConfigFactory -import app.simplecloud.plugin.connection.shared.config.ConnectionConfig -import app.simplecloud.plugin.connection.shared.config.TargetConnectionConfig -import app.simplecloud.plugin.connection.shared.server.ServerConnectionInfoGetter -import java.nio.file.Path - -class ServerConnectionPlugin
( - private val dataDirectory: Path, - private val serverConnectionInfoGetter: ServerConnectionInfoGetter, - private val permissionChecker: PermissionChecker
-) {
-
- val config = ConfigFactory.loadOrCreate(dataDirectory)
-
- fun getCommandConfigs(): List isAllowed(player: P, permissionChecker: PermissionChecker ): Boolean {
- if (bypassPermission.isNotEmpty() && permissionChecker.checkPermission(player, bypassPermission)) {
- return true
- }
-
- when (type) {
- Type.ENV -> {
- val env = System.getenv(name)
- return operation.matches(env, value, negate)
- }
-
- Type.PERMISSION -> {
- return permissionChecker.checkPermission(player, name).toString().equals(value, true)
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/connection-shared/src/main/kotlin/app/simplecloud/plugin/connection/shared/config/TargetConnectionConfig.kt b/connection-shared/src/main/kotlin/app/simplecloud/plugin/connection/shared/config/TargetConnectionConfig.kt
deleted file mode 100644
index 9f20ebc..0000000
--- a/connection-shared/src/main/kotlin/app/simplecloud/plugin/connection/shared/config/TargetConnectionConfig.kt
+++ /dev/null
@@ -1,11 +0,0 @@
-package app.simplecloud.plugin.connection.shared.config
-
-import app.simplecloud.plugin.api.shared.matcher.ServerMatcherConfiguration
-import org.spongepowered.configurate.objectmapping.ConfigSerializable
-
-@ConfigSerializable
-data class TargetConnectionConfig (
- val name: String = "",
- val priority: Int = 0,
- val from: List
because there are no fallback servers available.",
+)
+
+@ConfigSerializable
+data class ConnectionCommandMessages(
+ val commandUsage: String = "