.
This commit is contained in:
parent
ad2717b6d2
commit
670eba418c
4 changed files with 36 additions and 11 deletions
|
|
@ -24,6 +24,7 @@ maven.install(
|
||||||
"com.velocitypowered:velocity-api:4.1.0-20260802.091736-8",
|
"com.velocitypowered:velocity-api:4.1.0-20260802.091736-8",
|
||||||
"org.jdbi:jdbi3-core:3.53.0",
|
"org.jdbi:jdbi3-core:3.53.0",
|
||||||
"org.jdbi:jdbi3-postgres:3.53.0",
|
"org.jdbi:jdbi3-postgres:3.53.0",
|
||||||
|
"org.postgresql:postgresql:42.7.12",
|
||||||
"org.mongodb:bson:5.8.0",
|
"org.mongodb:bson:5.8.0",
|
||||||
"io.nats:jnats:2.25.2",
|
"io.nats:jnats:2.25.2",
|
||||||
"de.kentoj.scrow:kencommandapi-core:0.36-SNAPSHOT",
|
"de.kentoj.scrow:kencommandapi-core:0.36-SNAPSHOT",
|
||||||
|
|
|
||||||
24
README.md
24
README.md
|
|
@ -1,17 +1,29 @@
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
## BUILD
|
## BUILD
|
||||||
- make sure it doesn't break when using postgres/nats (i only tested with dummies)
|
- make sure it doesn't break when using nats
|
||||||
- lwk make sure velocity plugin works at runtime
|
- lwk make sure velocity plugin works at runtime
|
||||||
- runServer target:
|
- make dev-server use $DOCKER and fallback to docker if podman is not available.
|
||||||
- start papermc server
|
|
||||||
- start PostgreSQL server
|
|
||||||
- maybe also have some map loaded
|
|
||||||
- refactor BUILD files: MODULES.bazel
|
- refactor BUILD files: MODULES.bazel
|
||||||
- debate use of third_party; deduplicate
|
|
||||||
|
|
||||||
## bukkit
|
## bukkit
|
||||||
|
- MAKE A MINIGAME FIRST
|
||||||
- notification: Friend is now offline/online
|
- notification: Friend is now offline/online
|
||||||
|
- maybe lowk make kencommandapi's type's use Result instead of
|
||||||
|
exceptions so we can have cleaner error messages
|
||||||
|
- maybe `<msg> -- <raw input>`: `player not online -- kento2`,
|
||||||
|
`you can't add yourself as friend: kento2` -- this is weird again
|
||||||
|
- or similarly `illegal argument <raw input>: <msg>`: `illegal argument kento2:
|
||||||
|
you can't add yourself`. this is good lwk
|
||||||
|
- or just completely leave it up to the type: `<msg>` but then
|
||||||
|
we'd get inconsistencies or uninformative error messages.
|
||||||
|
maybe the error messages also just get simpler.
|
||||||
|
`you can't add yourself as friend`, `player not online` at /msg,
|
||||||
|
but with more arguments is super confusing.
|
||||||
|
- or `<arg-id>: <msg>`: `player: not online` could work. but then we'd get
|
||||||
|
`player: you can't add yourself as friend` which is kinda weird maybe.
|
||||||
|
also these IDs can be confusing.
|
||||||
|
- make `/friend add` use argument requirement for self-check
|
||||||
- /ignore command
|
- /ignore command
|
||||||
|
|
||||||
# Project
|
# Project
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ java_library(
|
||||||
)
|
)
|
||||||
|
|
||||||
java_binary(
|
java_binary(
|
||||||
name = "plugin_bin",
|
name = "_plugin",
|
||||||
srcs = glob(["plugin/main/**/*.java"]),
|
srcs = glob(["plugin/main/**/*.java"]),
|
||||||
create_executable = False,
|
create_executable = False,
|
||||||
resources = glob(["plugin/main/resources/**"]),
|
resources = glob(["plugin/main/resources/**"]),
|
||||||
|
|
@ -30,12 +30,13 @@ java_binary(
|
||||||
artifact("io.papermc.paper:paper-api"),
|
artifact("io.papermc.paper:paper-api"),
|
||||||
artifact("io.nats:jnats"),
|
artifact("io.nats:jnats"),
|
||||||
artifact("net.kyori:adventure-key:5.2.0"),
|
artifact("net.kyori:adventure-key:5.2.0"),
|
||||||
|
artifact("org.postgresql:postgresql"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
genrule(
|
genrule(
|
||||||
name = "plugin",
|
name = "plugin",
|
||||||
srcs = [":plugin_bin_deploy.jar"],
|
srcs = [":_plugin_deploy.jar"],
|
||||||
outs = ["plugin.jar"],
|
outs = ["plugin.jar"],
|
||||||
cmd = "cp $< $@",
|
cmd = "cp $< $@",
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,8 @@ def _dev_server_impl(ctx):
|
||||||
script = ctx.actions.declare_file(ctx.label.name + "_runner")
|
script = ctx.actions.declare_file(ctx.label.name + "_runner")
|
||||||
content = """
|
content = """
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eux
|
set -eu
|
||||||
|
|
||||||
echo hi\n
|
|
||||||
cp -f '%s' server.jar
|
cp -f '%s' server.jar
|
||||||
printf eula=true > eula.txt
|
printf eula=true > eula.txt
|
||||||
mkdir -p plugins
|
mkdir -p plugins
|
||||||
|
|
@ -13,7 +12,19 @@ for plugin in %s
|
||||||
do
|
do
|
||||||
cp -v \"$plugin\" plugins/
|
cp -v \"$plugin\" plugins/
|
||||||
done
|
done
|
||||||
exec java -jar server.jar --nogui %s
|
|
||||||
|
mkdir -p postgres-data
|
||||||
|
podman run \
|
||||||
|
--rm \
|
||||||
|
--name scrow-postgres-dev \
|
||||||
|
-p 5432:5432 \
|
||||||
|
-v ./postgres-data/:/data \
|
||||||
|
-e POSTGRES_USER=postgres \
|
||||||
|
-e POSTGRES_HOST_AUTH_METHOD=trust \
|
||||||
|
-d \
|
||||||
|
docker.io/postgres:alpine || true
|
||||||
|
echo "Starting paper server in $PWD"
|
||||||
|
exec env HOST_POSTGRES='jdbc:postgresql://127.0.0.1:5432/postgres' java -jar server.jar --nogui %s
|
||||||
""" % (
|
""" % (
|
||||||
ctx.file.server_jar.short_path,
|
ctx.file.server_jar.short_path,
|
||||||
" ".join([p.short_path for p in ctx.files.plugins]),
|
" ".join([p.short_path for p in ctx.files.plugins]),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue