This commit is contained in:
kento2 2026-08-08 03:41:09 +02:00
parent 670eba418c
commit 13ced30434
122 changed files with 223 additions and 12 deletions

0
core/BUILD Normal file
View file

View file

@ -4,15 +4,15 @@ load("@rules_java//java:java_binary.bzl", "java_binary")
java_library( java_library(
name = "api", name = "api",
srcs = glob(["api/main/**/*.java"]), srcs = glob(["api/main/java/**/*.java"]),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//core-lib:core", "//core/common",
artifact("io.papermc.paper:paper-api"), artifact("io.papermc.paper:paper-api"),
artifact("de.kentoj.scrow:kencommandapi-bukkit"), artifact("de.kentoj.scrow:kencommandapi-bukkit"),
], ],
exports = [ exports = [
"//core-lib:core", "//core/common",
artifact("de.kentoj.scrow:kencommandapi-bukkit"), artifact("de.kentoj.scrow:kencommandapi-bukkit"),
artifact("org.mongodb:bson"), artifact("org.mongodb:bson"),
], ],
@ -20,10 +20,10 @@ java_library(
java_binary( java_binary(
name = "_plugin", name = "_plugin",
srcs = glob(["plugin/main/**/*.java"]), srcs = glob(["plugin/main/java/**/*.java"]),
create_executable = False, create_executable = False,
resources = glob(["plugin/main/resources/**"]), resources = glob(["plugin/main/resources/**"]),
resource_strip_prefix = "core-bukkit/plugin/main/resources", resource_strip_prefix = "core/bukkit/plugin/main/resources",
deps = [ deps = [
":api", ":api",
artifact("net.luckperms:api"), artifact("net.luckperms:api"),

View file

@ -140,6 +140,11 @@ public class ScrowAPI {
return instanceManager; return instanceManager;
} }
/**
* Regions are not a reliable enough to detect fast movements.
* The way regions work is that every few ticks, all regions are checked for players.
* @see org.bukkit.event.player.PlayerMoveEvent
*/
public static RegionManager regionManager() { public static RegionManager regionManager() {
return regionManager; return regionManager;
} }

View file

@ -5,6 +5,11 @@ import org.jetbrains.annotations.Nullable;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
/**
* Regions are not a reliable enough to detect fast movements.
* The way regions work is that every few ticks, all regions are checked for players.
* @see org.bukkit.event.player.PlayerMoveEvent
*/
public interface RegionManager { public interface RegionManager {
List<Region> getRegions(ChunkPos chunkPos); List<Region> getRegions(ChunkPos chunkPos);

View file

@ -15,8 +15,8 @@ shared_deps = [
] ]
java_library( java_library(
name = "core", name = "common",
srcs = glob(["src/main/**/*.java"]), srcs = glob(["src/main/java/**/*.java"]),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = shared_deps + [ deps = shared_deps + [
artifact("org.jdbi:jdbi3-postgres"), artifact("org.jdbi:jdbi3-postgres"),

View file

@ -4,15 +4,15 @@ load("@rules_java//java:java_binary.bzl", "java_binary")
java_library( java_library(
name = "api", name = "api",
srcs = glob(["api/main/**/*.java"]), srcs = glob(["api/main/java/**/*.java"]),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//core-lib:core", "//core/common",
artifact("com.velocitypowered:velocity-api"), artifact("com.velocitypowered:velocity-api"),
artifact("de.kentoj.scrow:kencommandapi-velocity"), artifact("de.kentoj.scrow:kencommandapi-velocity"),
], ],
exports = [ exports = [
"//core-lib:core", "//core/common",
artifact("de.kentoj.scrow:kencommandapi-velocity"), artifact("de.kentoj.scrow:kencommandapi-velocity"),
artifact("org.mongodb:bson"), artifact("org.mongodb:bson"),
], ],
@ -20,7 +20,7 @@ java_library(
java_binary( java_binary(
name = "plugin", name = "plugin",
srcs = glob(["plugin/main/**/*.java"]), srcs = glob(["plugin/main/java/**/*.java"]),
create_executable = False, create_executable = False,
deps = [ deps = [
":api", ":api",

Some files were not shown because too many files have changed in this diff Show more