Skip to content

Commit 31196a7

Browse files
committed
feat: rename Velocity plugin class, add @plugin annotation, and bump dependencies and baseVersion
1 parent 0b24989 commit 31196a7

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
`signing`
1010
}
1111

12-
val baseVersion = "0.1.0-platform.15"
12+
val baseVersion = "0.1.0-platform.16"
1313
val commitHash = System.getenv("COMMIT_HASH")
1414
val isSnapshot = commitHash != null
1515

@@ -49,7 +49,9 @@ subprojects {
4949

5050
// Relocate to match api module's shading (so references match at runtime)
5151
relocate("io.nats", "app.simplecloud.api.shaded.nats")
52-
relocate("com.google", "app.simplecloud.api.shaded.google")
52+
relocate("com.google", "app.simplecloud.api.shaded.google") {
53+
exclude("com.google.inject.**")
54+
}
5355
relocate("build.buf", "app.simplecloud.api.shaded.buf")
5456
relocate("okhttp3", "app.simplecloud.api.shaded.okhttp3")
5557
relocate("okio", "app.simplecloud.api.shaded.okio")

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ gson-fire = "1.9.0"
1717
jakarta-annotation = "2.1.1"
1818
javax-annotation = "1.3.2"
1919

20-
velocity = "3.4.0-SNAPSHOT"
20+
velocity = "3.5.0-SNAPSHOT"
2121
bungeecord = "1.21-R0.4"
2222
paper = "1.21.4-R0.1-SNAPSHOT"
2323

platform/velocity/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ plugins {
55
dependencies {
66
implementation(project(":platform:shared"))
77
compileOnly(rootProject.libs.velocity)
8+
annotationProcessor(rootProject.libs.velocity)
89
compileOnly(rootProject.libs.adventure.api)
910
implementation(project(":api")) {
1011
exclude(group = "net.kyori")

platform/velocity/src/main/java/app/simplecloud/api/platform/velocity/VelocityApiProvider.java renamed to platform/velocity/src/main/java/app/simplecloud/api/platform/velocity/CloudApiVelocityPlugin.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,27 @@
44
import app.simplecloud.api.internal.integration.player.PlayerIntegration;
55
import app.simplecloud.api.player.CloudPlayer;
66
import app.simplecloud.api.platform.shared.PlayerSynchronizer;
7+
import com.google.inject.Inject;
78
import com.velocitypowered.api.event.Subscribe;
89
import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
910
import com.velocitypowered.api.event.proxy.ProxyShutdownEvent;
11+
import com.velocitypowered.api.plugin.Plugin;
1012
import com.velocitypowered.api.proxy.ConnectionRequestBuilder;
1113
import com.velocitypowered.api.proxy.Player;
1214
import com.velocitypowered.api.proxy.ProxyServer;
1315
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
1416
import org.slf4j.Logger;
1517

16-
import javax.inject.Inject;
1718
import java.util.UUID;
1819
import java.util.concurrent.CompletableFuture;
1920

20-
public class VelocityApiProvider {
21+
@Plugin(
22+
id = "simplecloud-api",
23+
name = "SimpleCloud API",
24+
version = "1.0",
25+
authors = {"Fllip"}
26+
)
27+
public class CloudApiVelocityPlugin {
2128

2229
private final Logger logger;
2330
private final ProxyServer proxyServer;
@@ -26,7 +33,7 @@ public class VelocityApiProvider {
2633
private final PlayerIntegration playerIntegration;
2734

2835
@Inject
29-
public VelocityApiProvider(Logger logger, ProxyServer proxyServer) {
36+
public CloudApiVelocityPlugin(Logger logger, ProxyServer proxyServer) {
3037
this.logger = logger;
3138
this.proxyServer = proxyServer;
3239
this.cloudApi = CloudApi.create();

platform/velocity/src/main/resources/velocity-plugin.json renamed to platform/velocity/src/main/resources/velocity-plugin_old.json

File renamed without changes.

0 commit comments

Comments
 (0)