make velocity work
This commit is contained in:
parent
1429286ce8
commit
ef32f9dbc4
5 changed files with 66 additions and 83 deletions
92
.idea/workspace.xml
generated
92
.idea/workspace.xml
generated
|
|
@ -9,7 +9,7 @@
|
|||
</component>
|
||||
<component name="BazelProjectProperties">
|
||||
<option name="bazelProject" value="true" />
|
||||
<option name="defaultJdkName" value="KenCommandAPI-jdk-e101e" />
|
||||
<option name="defaultJdkName" value="rules_jvm_external-jdk-b3ed7" />
|
||||
<option name="initialized" value="true" />
|
||||
<option name="rootDirUrl" value="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
|
|
@ -37,12 +37,11 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="6414223f-1761-4683-97f5-9dab59d6c44a" name="Changes" comment="BAZEL + some code">
|
||||
<change beforePath="$PROJECT_DIR$/.bazelrc" beforeDir="false" afterPath="$PROJECT_DIR$/.bazelrc" afterDir="false" />
|
||||
<list default="true" id="6414223f-1761-4683-97f5-9dab59d6c44a" name="Changes" comment="works">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/kencommandapi-bukkit/BUILD" beforeDir="false" afterPath="$PROJECT_DIR$/kencommandapi-bukkit/BUILD" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/kencommandapi-core/BUILD" beforeDir="false" afterPath="$PROJECT_DIR$/kencommandapi-core/BUILD" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/MODULE.bazel" beforeDir="false" afterPath="$PROJECT_DIR$/MODULE.bazel" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/kencommandapi-velocity/BUILD" beforeDir="false" afterPath="$PROJECT_DIR$/kencommandapi-velocity/BUILD" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/kencommandapi-velocity/build.gradle.kts" beforeDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
|
@ -171,7 +170,7 @@
|
|||
"bazel.project.detector.is.bazel.project": "true",
|
||||
"git-widget-placeholder": "master",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"last_opened_file_path": "/home/a/src/scrow/KenCommandAPI/gradle",
|
||||
"last_opened_file_path": "/home/a/src/random/rules_jvm_external",
|
||||
"project.structure.last.edited": "Modules",
|
||||
"project.structure.proportion": "0.15",
|
||||
"project.structure.side.proportion": "0.6268199",
|
||||
|
|
@ -188,11 +187,11 @@
|
|||
<recent name="de.kencommand.api" />
|
||||
</key>
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="$PROJECT_DIR$/kencommandapi-velocity" />
|
||||
<recent name="$PROJECT_DIR$/gradle" />
|
||||
<recent name="$PROJECT_DIR$/kencommandapi-core/src/test/java/a" />
|
||||
<recent name="$PROJECT_DIR$/kencommandapi-core" />
|
||||
<recent name="$PROJECT_DIR$/kencommandapi-velocity/src/main/java/de/kentoj/kencommandapi" />
|
||||
<recent name="$PROJECT_DIR$/src/main/java/de/kencommand/api" />
|
||||
</key>
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="$PROJECT_DIR$/third_party" />
|
||||
|
|
@ -228,9 +227,21 @@
|
|||
<command value="bazel build //kencommandapi-bukkit:bukkit" />
|
||||
<command value="bazel build //kencommandapi-bukkit:bukkit --nojava_header_compilation" />
|
||||
<command value="bazel clean" />
|
||||
<command value="bazel sync --only=maven --verbose_failures" />
|
||||
<command value="bazel build //kencommandapi-core:core-lib" />
|
||||
<command value="bazel build //kencommandapi-core:core-lib --verbose" />
|
||||
<command value="bazel build //kencommandapi-core:core-lib -v" />
|
||||
<command value="bazel build //kencommandapi-core:core-lib --help" />
|
||||
<command value="bazel build -v //kencommandapi-core:core-lib " />
|
||||
<command value="bazel -v build //kencommandapi-core:core-lib " />
|
||||
<command value="bazel -v build //kencommandapi-core:core-lib --subcommands " />
|
||||
<command value="bazel build //kencommandapi-core:core-lib --subcommands " />
|
||||
<command value="bazel build //kencommandapi-core:core-lib --subcommands --verbose_failures" />
|
||||
<command value="bazel clean --expunge" />
|
||||
<command value="bazel shutdown" />
|
||||
</option>
|
||||
</component>
|
||||
<component name="RunManager" selected="Bazel.Run //kencommandapi-bukkit:bukkit.publish">
|
||||
<component name="RunManager" selected="Bazel.Run //kencommandapi-velocity:velocity.publish">
|
||||
<configuration name="Run //kencommandapi-bukkit:bukkit.publish" type="BazelRunConfigurationType" temporary="true">
|
||||
<bsp-state handler-provider-id="GenericRunHandlerProvider">
|
||||
<bsp-target>@//kencommandapi-bukkit:bukkit.publish</bsp-target>
|
||||
|
|
@ -238,6 +249,13 @@
|
|||
</bsp-state>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Run //kencommandapi-core:core.publish" type="BazelRunConfigurationType" temporary="true">
|
||||
<bsp-state handler-provider-id="GenericRunHandlerProvider">
|
||||
<bsp-target>@//kencommandapi-core:core.publish</bsp-target>
|
||||
<handler-state />
|
||||
</bsp-state>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Run //kencommandapi-core:export.publish" type="BazelRunConfigurationType" temporary="true">
|
||||
<bsp-state handler-provider-id="GenericRunHandlerProvider">
|
||||
<bsp-target>@//kencommandapi-core:export.publish</bsp-target>
|
||||
|
|
@ -245,26 +263,11 @@
|
|||
</bsp-state>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="KenCommandAPI [clean]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="clean" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<RunAsTest>false</RunAsTest>
|
||||
<configuration name="Run //kencommandapi-velocity:velocity.publish" type="BazelRunConfigurationType" temporary="true">
|
||||
<bsp-state handler-provider-id="GenericRunHandlerProvider">
|
||||
<bsp-target>@//kencommandapi-velocity:velocity.publish</bsp-target>
|
||||
<handler-state />
|
||||
</bsp-state>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="KenCommandAPI [publishAllPublicationsToScrowRepository]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||
|
|
@ -289,28 +292,6 @@
|
|||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="KenCommandAPI [publish]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="publish" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration default="true" type="JetRunConfigurationType">
|
||||
<module name="build-logic.convention.main" />
|
||||
<method v="2">
|
||||
|
|
@ -324,10 +305,10 @@
|
|||
</configuration>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="Bazel.Run //kencommandapi-velocity:velocity.publish" />
|
||||
<item itemvalue="Bazel.Run //kencommandapi-bukkit:bukkit.publish" />
|
||||
<item itemvalue="Bazel.Run //kencommandapi-core:core.publish" />
|
||||
<item itemvalue="Bazel.Run //kencommandapi-bukkit:bukkit.publish" />
|
||||
<item itemvalue="Bazel.Run //kencommandapi-core:export.publish" />
|
||||
<item itemvalue="Bazel.Run //kencommandapi-core:export.publish" />
|
||||
<item itemvalue="Bazel.Run //kencommandapi-core:export.publish" />
|
||||
<item itemvalue="Bazel.Run //kencommandapi-core:export.publish" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
|
|
@ -593,6 +574,7 @@
|
|||
<MESSAGE value="use version catalog" />
|
||||
<MESSAGE value="BAZEL" />
|
||||
<MESSAGE value="BAZEL + some code" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="BAZEL + some code" />
|
||||
<MESSAGE value="works" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="works" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -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")
|
||||
|
|
@ -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" ],
|
||||
|
||||
)
|
||||
|
|
@ -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<MavenPublication>("KenCommandAPI") {
|
||||
groupId = rootProject.group.toString()
|
||||
version = rootProject.version.toString()
|
||||
artifactId = project.name
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -14,14 +14,14 @@ public class PlayerArgumentType implements ArgumentType<CommandSource, Player> {
|
|||
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<CommandSource> defaultSuggestionProvider() {
|
||||
public SuggestionProvider<CommandSource> getDefaultSuggestionProvider() {
|
||||
return new PlayerSuggestionProvider(server);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue