diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8778dd5..0b1db7c 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -9,7 +9,7 @@ @@ -37,12 +37,11 @@ - - + - - - + + + - + @//kencommandapi-bukkit:bukkit.publish @@ -238,6 +249,13 @@ + + + @//kencommandapi-core:core.publish + + + + @//kencommandapi-core:export.publish @@ -245,26 +263,11 @@ - - - - - - true - true - false - false + + + @//kencommandapi-velocity:velocity.publish + + @@ -289,28 +292,6 @@ false - - - - - - true - true - false - false - - @@ -324,10 +305,10 @@ + + + - - - @@ -593,6 +574,7 @@ - \ No newline at end of file diff --git a/MODULE.bazel b/MODULE.bazel index eb72735..a792429 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -1,6 +1,11 @@ bazel_dep(name = "rules_java", version = "9.7.0") bazel_dep(name = "rules_jvm_external", version = "7.1") +git_override( + module_name = "rules_jvm_external", + remote = "http://forge.kentoj.de/scrow/rules_jvm_external.git", +) + maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") maven.install( name = "maven", @@ -14,10 +19,12 @@ maven.install( "org.slf4j:slf4j-simple:2.0.18", "net.kyori:adventure-api:5.2.0", "io.papermc.paper:paper-api:[26.2.build,)", + "com.velocitypowered:velocity-api:4.1.0-20260802.091736-8", ], repositories = [ "https://repo.papermc.io/repository/maven-public/", - ] + ], + known_contributing_modules = ["protobuf"], ) use_repo(maven, "maven") \ No newline at end of file diff --git a/kencommandapi-velocity/BUILD b/kencommandapi-velocity/BUILD index e69de29..8dc0eee 100644 --- a/kencommandapi-velocity/BUILD +++ b/kencommandapi-velocity/BUILD @@ -0,0 +1,18 @@ +load("@rules_jvm_external//:defs.bzl", "artifact", "java_export") + +java_export( + name = "velocity", + maven_coordinates = "de.kentoj.scrow:kencommandapi-velocity:0.34-SNAPSHOT", + srcs = glob(["src/main/**/*.java"]), + deps = [ + "//kencommandapi-core:core", + artifact("org.projectlombok:lombok"), + artifact("org.jetbrains:annotations"), + artifact("com.velocitypowered:velocity-api"), + ], + exports = [ + "//kencommandapi-core:core", + ], + plugins = [ "//third_party:lombok_plugin" ], + +) \ No newline at end of file diff --git a/kencommandapi-velocity/build.gradle.kts b/kencommandapi-velocity/build.gradle.kts deleted file mode 100644 index 905203b..0000000 --- a/kencommandapi-velocity/build.gradle.kts +++ /dev/null @@ -1,24 +0,0 @@ -plugins { - id("java") - id("scrow.scrow-publish") - id("scrow.base-dependencies") - id("scrow.java-library") -} - -dependencies { - annotationProcessor(libs.velocity.api) - compileOnly(libs.velocity.api) - - api(project(":kencommandapi-core")) -} - -publishing { - publications { - create("KenCommandAPI") { - groupId = rootProject.group.toString() - version = rootProject.version.toString() - artifactId = project.name - from(components["java"]) - } - } -} diff --git a/kencommandapi-velocity/src/main/java/de/kentoj/kencommandapi/type/PlayerArgumentType.java b/kencommandapi-velocity/src/main/java/de/kentoj/kencommandapi/type/PlayerArgumentType.java index 3ba3a7e..f894873 100644 --- a/kencommandapi-velocity/src/main/java/de/kentoj/kencommandapi/type/PlayerArgumentType.java +++ b/kencommandapi-velocity/src/main/java/de/kentoj/kencommandapi/type/PlayerArgumentType.java @@ -14,14 +14,14 @@ public class PlayerArgumentType implements ArgumentType { private final ProxyServer server; @Override - public Player parseInput(String string) { - var player = server.getPlayer(string).orElse(null); + public Player parseInputUnchecked(String input) { + var player = server.getPlayer(input).orElse(null); if (player == null) throw new IllegalArgumentException("Player not online"); return player; } @Override - public SuggestionProvider defaultSuggestionProvider() { + public SuggestionProvider getDefaultSuggestionProvider() { return new PlayerSuggestionProvider(server); } }