.
This commit is contained in:
parent
13ced30434
commit
a9b7f47494
35 changed files with 1024 additions and 123 deletions
|
|
@ -16,21 +16,24 @@ java_library(
|
|||
artifact("de.kentoj.scrow:kencommandapi-bukkit"),
|
||||
artifact("org.mongodb:bson"),
|
||||
],
|
||||
neverlink = True,
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "_plugin",
|
||||
srcs = glob(["plugin/main/java/**/*.java"]),
|
||||
srcs = glob(["plugin/main/java/**/*.java", "api/main/java/**/*.java"]),
|
||||
create_executable = False,
|
||||
resources = glob(["plugin/main/resources/**"]),
|
||||
resource_strip_prefix = "core/bukkit/plugin/main/resources",
|
||||
deps = [
|
||||
":api",
|
||||
"//core/common",
|
||||
artifact("de.kentoj.scrow:kencommandapi-bukkit"),
|
||||
artifact("net.luckperms:api"),
|
||||
artifact("io.papermc.paper:paper-api"),
|
||||
artifact("io.nats:jnats"),
|
||||
artifact("net.kyori:adventure-key:5.2.0"),
|
||||
artifact("org.postgresql:postgresql"),
|
||||
artifact("org.mongodb:bson"),
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package de.kentoj.scrow.bukkit;
|
||||
|
||||
import de.kentoj.scrow.bukkit.style.ChatStyleListener;
|
||||
import de.kentoj.scrow.bukkit.command.economy.CoinsCommand;
|
||||
import de.kentoj.scrow.bukkit.command.friends.FriendCommand;
|
||||
import de.kentoj.scrow.bukkit.command.instance.InstanceCache;
|
||||
|
|
@ -9,22 +8,22 @@ import de.kentoj.scrow.bukkit.command.instance.LobbyCommand;
|
|||
import de.kentoj.scrow.bukkit.command.instance.PlayCommand;
|
||||
import de.kentoj.scrow.bukkit.internal.player.prefix.CachedPrefixProvider;
|
||||
import de.kentoj.scrow.bukkit.internal.player.prefix.LuckPermsPrefixSetter;
|
||||
import de.kentoj.scrow.bukkit.style.ChatStyleListener;
|
||||
import de.kentoj.scrow.bukkit.style.TabStyleListener;
|
||||
import net.luckperms.api.LuckPermsProvider;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public final class CoreImplPlugin extends JavaPlugin {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(CoreImplPlugin.class);
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
var cachedPrefixProvider = new CachedPrefixProvider();
|
||||
ScrowAPISurface.initScrowAPI(this, cachedPrefixProvider);
|
||||
log.info("Initialized ScrowAPI");
|
||||
|
||||
ScrowAPI.playerCommands().register(new CoinsCommand().rootLiteral());
|
||||
ScrowAPI.playerCommands().register(new FriendCommand().rootLiteral());
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public final class InstanceDestroyLiteral {
|
|||
this.style = style;
|
||||
|
||||
handleArg = CommandArgumentSpec.builder("handle", new StringArgumentType<CommandSender>())
|
||||
.withSuggestionProvider(_ ->
|
||||
.withSuggestionProvider((_, _) ->
|
||||
cache.getInstances().stream()
|
||||
.map(ServerInstance::handle)
|
||||
.toList())
|
||||
|
|
|
|||
|
|
@ -16,16 +16,19 @@ java_library(
|
|||
artifact("de.kentoj.scrow:kencommandapi-velocity"),
|
||||
artifact("org.mongodb:bson"),
|
||||
],
|
||||
neverlink = True,
|
||||
)
|
||||
|
||||
java_binary(
|
||||
name = "plugin",
|
||||
srcs = glob(["plugin/main/java/**/*.java"]),
|
||||
srcs = glob(["plugin/main/java/**/*.java", "api/main/java/**/*.java"]),
|
||||
create_executable = False,
|
||||
deps = [
|
||||
":api",
|
||||
"//core/common",
|
||||
artifact("com.velocitypowered:velocity-api"),
|
||||
artifact("com.google.inject:guice"),
|
||||
artifact("io.nats:jnats"),
|
||||
artifact("de.kentoj.scrow:kencommandapi-velocity"),
|
||||
artifact("org.mongodb:bson"),
|
||||
],
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue