mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2026-05-03 03:30:26 +00:00
Compare commits
8 Commits
0.12.2
...
0.12.3-SNA
| Author | SHA1 | Date | |
|---|---|---|---|
|
71287055b4
|
|||
|
8b48736bc1
|
|||
|
a2e6aff4c2
|
|||
|
7c1c1183cf
|
|||
|
7f35b64d93
|
|||
|
3dc3d80045
|
|||
|
765e6fe122
|
|||
|
e8514b3e8b
|
6
.github/workflows/gradle.yml
vendored
6
.github/workflows/gradle.yml
vendored
@@ -29,14 +29,14 @@ jobs:
|
||||
# Artifact name
|
||||
name: RedisBungee-Bungee
|
||||
# Destination path
|
||||
path: RedisBungee-Bungee/build/libs/*
|
||||
path: proxies/bungeecord/build/libs/*
|
||||
- name: Upload Velocity
|
||||
uses: actions/upload-artifact@v2.2.3
|
||||
with:
|
||||
name: RedisBungee-Velocity
|
||||
path: RedisBungee-Velocity/build/libs/*
|
||||
path: proxies/velocity/build/libs/*
|
||||
- name: Upload API
|
||||
uses: actions/upload-artifact@v2.2.3
|
||||
with:
|
||||
name: RedisBungee-API
|
||||
path: RedisBungee-API/build/libs/*
|
||||
path: api/build/libs/*
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -46,4 +46,4 @@ manifest.mf
|
||||
javadoc
|
||||
|
||||
# run-server folders
|
||||
*/run
|
||||
proxies/*/run
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -23,11 +22,3 @@ tasks {
|
||||
filteringCharset = Charsets.UTF_8.name()
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
group=com.imaginarycode.minecraft
|
||||
version=0.12.2
|
||||
version=0.12.3-SNAPSHOT
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
java
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1"
|
||||
id("xyz.jpenilla.run-waterfall") version "2.0.0"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(project(":RedisBungee-API"))
|
||||
implementation(project(":RedisBungee-Bungee"))
|
||||
compileOnly(libs.platform.bungeecord) {
|
||||
exclude("com.google.guava", "guava")
|
||||
exclude("com.google.code.gson", "gson")
|
||||
@@ -21,23 +20,10 @@ dependencies {
|
||||
description = "RedisBungee Bungeecord implementation"
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
|
||||
tasks {
|
||||
withType<Javadoc> {
|
||||
dependsOn(project(":RedisBungee-API").getTasksByName("javadoc", false))
|
||||
val options = options as StandardJavadocDocletOptions
|
||||
options.use()
|
||||
options.isDocFilesSubDirs = true
|
||||
options.links(
|
||||
"https://ci.md-5.net/job/BungeeCord/ws/api/target/apidocs/", // bungeecord api
|
||||
)
|
||||
val apiDocs = File(rootProject.projectDir, "RedisBungee-API/build/docs/javadoc")
|
||||
options.linksOffline("https://ci.limework.net/RedisBungee/RedisBungee-API/build/docs/javadoc", apiDocs.path)
|
||||
}
|
||||
runWaterfall {
|
||||
waterfallVersion("1.20")
|
||||
environment["REDISBUNGEE_PROXY_ID"] = "bungeecord-1"
|
||||
@@ -47,9 +33,6 @@ tasks {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.release.set(17)
|
||||
}
|
||||
javadoc {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
}
|
||||
processResources {
|
||||
filteringCharset = Charsets.UTF_8.name()
|
||||
filesMatching("plugin.yml") {
|
||||
@@ -81,11 +64,3 @@ tasks {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
}
|
||||
50
proxies/bungeecord/bungeecord-api/build.gradle.kts
Normal file
50
proxies/bungeecord/bungeecord-api/build.gradle.kts
Normal file
@@ -0,0 +1,50 @@
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(project(":RedisBungee-API"))
|
||||
compileOnly(libs.platform.bungeecord) {
|
||||
exclude("com.google.guava", "guava")
|
||||
exclude("com.google.code.gson", "gson")
|
||||
exclude("net.kyori","adventure-api")
|
||||
}
|
||||
}
|
||||
|
||||
description = "RedisBungee Bungeecord API"
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
|
||||
tasks {
|
||||
withType<Javadoc> {
|
||||
dependsOn(project(":RedisBungee-API").getTasksByName("javadoc", false))
|
||||
val options = options as StandardJavadocDocletOptions
|
||||
options.use()
|
||||
options.isDocFilesSubDirs = true
|
||||
options.links(
|
||||
"https://ci.md-5.net/job/BungeeCord/ws/api/target/apidocs/", // bungeecord api
|
||||
)
|
||||
val apiDocs = File(rootProject.projectDir, "api/build/docs/javadoc")
|
||||
options.linksOffline("https://ci.limework.net/ValioBungee/api/build/docs/javadoc", apiDocs.path)
|
||||
}
|
||||
compileJava {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.release.set(17)
|
||||
}
|
||||
javadoc {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,11 @@
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
java
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1"
|
||||
id("xyz.jpenilla.run-velocity") version "2.0.0"
|
||||
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
api(project(":RedisBungee-API")) {
|
||||
// Since velocity already includes guava / configurate exlude them
|
||||
exclude("com.google.guava", "guava")
|
||||
exclude("com.google.code.gson", "gson")
|
||||
exclude("org.spongepowered", "configurate-yaml")
|
||||
// exclude also adventure api
|
||||
exclude("net.kyori", "adventure-api")
|
||||
exclude("net.kyori", "adventure-text-serializer-gson")
|
||||
exclude("net.kyori", "adventure-text-serializer-legacy")
|
||||
exclude("net.kyori", "adventure-text-serializer-plain")
|
||||
exclude("net.kyori", "adventure-text-minimessage")
|
||||
}
|
||||
implementation(project(":RedisBungee-Velocity"))
|
||||
compileOnly(libs.platform.velocity)
|
||||
annotationProcessor(libs.platform.velocity)
|
||||
implementation(project(":RedisBungee-Commands"))
|
||||
@@ -30,22 +16,10 @@ dependencies {
|
||||
description = "RedisBungee Velocity implementation"
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
tasks {
|
||||
withType<Javadoc> {
|
||||
dependsOn(project(":RedisBungee-API").getTasksByName("javadoc", false))
|
||||
val options = options as StandardJavadocDocletOptions
|
||||
options.use()
|
||||
options.isDocFilesSubDirs = true
|
||||
options.links(
|
||||
"https://jd.papermc.io/velocity/3.0.0/", // velocity api
|
||||
)
|
||||
val apiDocs = File(rootProject.projectDir, "RedisBungee-API/build/docs/javadoc")
|
||||
options.linksOffline("https://ci.limework.net/RedisBungee/RedisBungee-API/build/docs/javadoc", apiDocs.path)
|
||||
}
|
||||
runVelocity {
|
||||
velocityVersion("3.3.0-SNAPSHOT")
|
||||
environment["REDISBUNGEE_PROXY_ID"] = "velocity-1"
|
||||
@@ -55,9 +29,6 @@ tasks {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.release.set(17)
|
||||
}
|
||||
javadoc {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
}
|
||||
processResources {
|
||||
filteringCharset = Charsets.UTF_8.name()
|
||||
}
|
||||
@@ -75,10 +46,3 @@ tasks {
|
||||
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@ import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Plugin(id = "redisbungee", name = "RedisBungee", version = Constants.VERSION, url = "https://github.com/ProxioDev/RedisBungee", authors = {"astei", "ProxioDev"})
|
||||
public class RedisBungeeVelocityPlugin implements RedisBungeePlugin<Player>, ConfigLoader, LangConfigLoader {
|
||||
public class RedisBungeeVelocityPlugin implements RedisBungeePlugin<Player>, ConfigLoader, LangConfigLoader, ServerObjectFetcher {
|
||||
private final ProxyServer server;
|
||||
private final Logger logger;
|
||||
private final Path dataFolder;
|
||||
61
proxies/velocity/velocity-api/build.gradle.kts
Normal file
61
proxies/velocity/velocity-api/build.gradle.kts
Normal file
@@ -0,0 +1,61 @@
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(project(":RedisBungee-API")) {
|
||||
// Since velocity already includes guava / configurate exlude them
|
||||
exclude("com.google.guava", "guava")
|
||||
exclude("com.google.code.gson", "gson")
|
||||
exclude("org.spongepowered", "configurate-yaml")
|
||||
// exclude also adventure api
|
||||
exclude("net.kyori", "adventure-api")
|
||||
exclude("net.kyori", "adventure-text-serializer-gson")
|
||||
exclude("net.kyori", "adventure-text-serializer-legacy")
|
||||
exclude("net.kyori", "adventure-text-serializer-plain")
|
||||
exclude("net.kyori", "adventure-text-minimessage")
|
||||
}
|
||||
compileOnly(libs.platform.velocity)
|
||||
|
||||
}
|
||||
|
||||
description = "RedisBungee Velocity API"
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
tasks {
|
||||
withType<Javadoc> {
|
||||
dependsOn(project(":RedisBungee-API").getTasksByName("javadoc", false))
|
||||
val options = options as StandardJavadocDocletOptions
|
||||
options.use()
|
||||
options.isDocFilesSubDirs = true
|
||||
options.links(
|
||||
"https://jd.papermc.io/velocity/3.0.0/", // velocity api
|
||||
)
|
||||
val apiDocs = File(rootProject.projectDir, "api/build/docs/javadoc")
|
||||
options.linksOffline("https://ci.limework.net/ValioBungee/api/build/docs/javadoc", apiDocs.path)
|
||||
}
|
||||
compileJava {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.release.set(17)
|
||||
}
|
||||
javadoc {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
}
|
||||
processResources {
|
||||
filteringCharset = Charsets.UTF_8.name()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ public class RedisBungeeAPI extends AbstractRedisBungeeAPI {
|
||||
public final ServerInfo getServerFor(@NonNull UUID player) {
|
||||
String serverName = this.getServerNameFor(player);
|
||||
if (serverName == null) return null;
|
||||
return ((RedisBungeeVelocityPlugin) this.plugin).getProxy().getServer(serverName).map((RegisteredServer::getServerInfo)).orElse(null);
|
||||
return ((ServerObjectFetcher) this.plugin).getProxy().getServer(serverName).map((RegisteredServer::getServerInfo)).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.imaginarycode.minecraft.redisbungee;
|
||||
|
||||
import com.velocitypowered.api.proxy.ProxyServer;
|
||||
|
||||
public interface ServerObjectFetcher {
|
||||
|
||||
ProxyServer getProxy();
|
||||
|
||||
|
||||
}
|
||||
@@ -4,12 +4,31 @@ pluginManagement {
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "RedisBungee-Parent"
|
||||
rootProject.name = "ValioBungee"
|
||||
|
||||
include(":RedisBungee-API")
|
||||
project(":RedisBungee-API").projectDir = file("api")
|
||||
|
||||
include(":RedisBungee-Commands")
|
||||
project(":RedisBungee-Commands").projectDir = file("commands")
|
||||
|
||||
include(":RedisBungee-Velocity")
|
||||
include(":RedisBungee-Commands")
|
||||
project(":RedisBungee-Velocity").projectDir = file("proxies/velocity")
|
||||
|
||||
include(":RedisBungee-Bungee")
|
||||
include(":RedisBungee-API")
|
||||
project(":RedisBungee-Bungee").projectDir = file("proxies/bungeecord/bungeecord-api")
|
||||
|
||||
include(":RedisBungee-Proxy-Bungee")
|
||||
project(":RedisBungee-Proxy-Bungee").projectDir = file("proxies/bungeecord")
|
||||
|
||||
include(":RedisBungee-Velocity")
|
||||
project(":RedisBungee-Velocity").projectDir = file("proxies/velocity/velocity-api")
|
||||
|
||||
include(":RedisBungee-Proxy-Velocity")
|
||||
project(":RedisBungee-Proxy-Velocity").projectDir = file("proxies/velocity")
|
||||
|
||||
|
||||
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
|
||||
Reference in New Issue
Block a user