Skip to content

Commit 6dbbd2f

Browse files
authored
Merge pull request #3 from simplecloudapp/feat/integrate-cloud-api
feat: integrate new cloud api
2 parents 7a4b838 + 8063686 commit 6dbbd2f

File tree

5 files changed

+30
-7
lines changed

5 files changed

+30
-7
lines changed

build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ subprojects {
3131

3232
dependencies {
3333
testImplementation(rootProject.libs.kotlin.test)
34-
implementation(rootProject.libs.kotlin.jvm)
34+
compileOnly(rootProject.libs.kotlin.jvm)
3535
}
3636

3737
publishing {
@@ -58,7 +58,9 @@ subprojects {
5858
dependencies {
5959
exclude(dependency("com.velocitypowered:velocity-api"))
6060

61-
relocate("org.incendo", "app.simplecloud.plugin.command.external")
61+
relocate("org.incendo", "app.simplecloud.plugin.command.relocate.incendo")
62+
relocate("org.spongepowered", "app.simplecloud.plugin.command.relocate.spongepowered")
63+
relocate("app.simplecloud.plugin.api", "app.simplecloud.plugin.command.relocate.plugin.api")
6264
}
6365
/* dependsOn("processResources")
6466
dependencies {
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: CommandPlugin
22
version: 0.0.1-EXPERIMENTAL
33
author: Kaseax
4-
main: app.simplecloud.plugin.command.bungeecord.BungeeCordPlugin
4+
main: app.simplecloud.plugin.command.bungeecord.BungeeCordPlugin
5+
depends: [simplecloud-api]

command-shared/build.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
dependencies {
2-
api(libs.simplecloud.controller)
2+
compileOnly(libs.simplecloud.controller)
33
api(libs.cloud.core)
44
api(libs.adventure.api)
55
api(libs.adventure.text.minimessage)
6+
7+
implementation(rootProject.libs.configurate.yaml)
8+
implementation(rootProject.libs.configurate.kotlin) {
9+
exclude(group = "org.jetbrains.kotlin")
10+
exclude(group = "org.jetbrains.kotlinx")
11+
}
612
}

command-velocity/src/main/kotlin/app/simplecloud/plugin/command/velocity/VelocityPlugin.kt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ package app.simplecloud.plugin.command.velocity
33
import app.simplecloud.plugin.command.shared.CloudCommandHandler
44
import app.simplecloud.plugin.command.shared.CloudSender
55
import app.simplecloud.plugin.command.shared.CommandPlugin
6-
import app.simplecloud.plugin.command.shared.config.MessageConfig
7-
import app.simplecloud.plugin.command.shared.config.YamlConfig
86
import com.google.inject.Inject
97
import com.velocitypowered.api.command.CommandSource
108
import com.velocitypowered.api.event.Subscribe
119
import com.velocitypowered.api.event.proxy.ProxyInitializeEvent
10+
import com.velocitypowered.api.plugin.Dependency
1211
import com.velocitypowered.api.plugin.Plugin
1312
import com.velocitypowered.api.plugin.PluginContainer
1413
import com.velocitypowered.api.plugin.annotation.DataDirectory
@@ -23,7 +22,17 @@ import kotlin.io.path.pathString
2322
* @author Fynn Bauer in 2024
2423
*/
2524

26-
@Plugin(id = "command-plugin", name = "SimpleCloud Command Plugin", authors = ["Kaseax"], version = "0.0.1-EXPERIMENTAL")
25+
@Plugin(
26+
id = "command-plugin",
27+
name = "SimpleCloud Command Plugin",
28+
authors = ["Kaseax"],
29+
version = "0.0.1-EXPERIMENTAL",
30+
dependencies = [
31+
Dependency(
32+
id = "simplecloud-api"
33+
)
34+
]
35+
)
2736
class VelocityPlugin @Inject constructor(
2837
private val server: ProxyServer,
2938
@DataDirectory val dataDirectory: Path,

gradle/libs.versions.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ adventure-platform-bungeecord = "4.3.4"
1313
adventure-text-minimessage = "4.17.0"
1414
minotaur = "2.8.7"
1515

16+
configurate-yaml = "4.0.0"
17+
configurate-kotlin = "4.1.2"
18+
1619
[libraries]
1720
kotlin-jvm = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
1821
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
@@ -25,6 +28,8 @@ bungeecord-api = { module = "net.md-5:bungeecord-api", version.ref = "bungeecord
2528
adventure-api = { module = "net.kyori:adventure-api", version.ref = "adventure-api" }
2629
adveture-platform-bungeecord = { module = "net.kyori:adventure-platform-bungeecord", version.ref = "adventure-platform-bungeecord" }
2730
adventure-text-minimessage = { module = "net.kyori:adventure-text-minimessage", version.ref = "adventure-text-minimessage" }
31+
configurate-yaml = { module = "org.spongepowered:configurate-yaml", version.ref = "configurate-yaml" }
32+
configurate-kotlin = { module = "org.spongepowered:configurate-extra-kotlin", version.ref = "configurate-kotlin" }
2833

2934
[plugins]
3035
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }

0 commit comments

Comments
 (0)