bazeling real hard today
This commit is contained in:
parent
5cb75791e7
commit
80d9b07f0c
45 changed files with 426 additions and 718 deletions
20
core-velocity-api/BUILD
Normal file
20
core-velocity-api/BUILD
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
load("@rules_jvm_external//:defs.bzl", "artifact")
|
||||
load("@rules_java//java:java_library.bzl", "java_library")
|
||||
|
||||
java_library(
|
||||
name = "core-velocity-api",
|
||||
srcs = glob(["src/main/**/*.java"]),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//core-lib:core",
|
||||
artifact("com.velocitypowered:velocity-api"),
|
||||
artifact("org.projectlombok:lombok"),
|
||||
artifact("de.kentoj.scrow:kencommandapi-velocity"),
|
||||
],
|
||||
exports = [
|
||||
"//core-lib:core",
|
||||
artifact("de.kentoj.scrow:kencommandapi-velocity"),
|
||||
artifact("org.mongodb:bson"),
|
||||
],
|
||||
plugins = [ "//third_party:lombok_plugin" ],
|
||||
)
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package de.kentoj.scrow.velocity;
|
||||
|
||||
import com.velocitypowered.api.command.CommandSource;
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import de.kentoj.kencommandapi.CommandAPI;
|
||||
import de.kentoj.scrowlib.instancemanager.InstanceManager;
|
||||
|
|
@ -20,7 +21,9 @@ public class ScrowAPI {
|
|||
@Getter
|
||||
private static Jdbi jdbi;
|
||||
@Getter
|
||||
private static CommandAPI commandApi;
|
||||
private static CommandAPI<CommandSource> commands;
|
||||
@Getter
|
||||
private static CommandAPI<Player> playerCommands;
|
||||
@Getter
|
||||
private static MessageBroker messageBroker;
|
||||
@Getter
|
||||
|
|
@ -35,12 +38,6 @@ public class ScrowAPI {
|
|||
return playerFactory.create(uuid);
|
||||
}
|
||||
|
||||
|
||||
@ApiStatus.Internal
|
||||
public static void setCommandApi(CommandAPI commandApi) {
|
||||
ScrowAPI.commandApi = commandApi;
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public static void setMessageBroker(MessageBroker messageBroker) {
|
||||
ScrowAPI.messageBroker = messageBroker;
|
||||
|
|
@ -60,5 +57,15 @@ public class ScrowAPI {
|
|||
public static void setPlayerFactory(NetworkPlayerFactory playerFactory) {
|
||||
ScrowAPI.playerFactory = playerFactory;
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public static void setPlayerCommands(CommandAPI<Player> playerCommands) {
|
||||
ScrowAPI.playerCommands = playerCommands;
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public static void setCommands(CommandAPI<CommandSource> commands) {
|
||||
ScrowAPI.commands = commands;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue