Skip to content

Commit

Permalink
feat: added VulpesCloud hook to use the cloud with RediVelocity
Browse files Browse the repository at this point in the history
  • Loading branch information
byPixelTV authored Dec 15, 2024
2 parents e268d76 + ebbaea3 commit 55f250a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<h1 align="center">RediVelocity</h1>

<h3 align="center">A simple but efficient Velocity plugin to synchronize data between proxies.</h3>
<h5 align="center">RediVelocity supports the general use with a normal multiproxy setup with Velocity, or a multiproxy setup using CloudNet or SimpleCloud!</h6>
<h5 align="center">RediVelocity supports the general use with a normal multiproxy setup with Velocity, or a multiproxy setup using CloudNet, SimpleCloud or VulpesCloud!</h6>
<h6 align="center">Get information about your network and players with the build-in commands or use it in your code via Redis Pub/Sub or with the data stored in the Redis database!</h6>
<hr>

Expand All @@ -24,7 +24,7 @@
* **Java 23+**
* **Velocity 3.4.0-SNAPSHOT**
* **Redis Server**
* **CloudNet or SimpleCloud (optional)**
* **CloudNet, SimpleCloud or VulpesCloud (optional)**

### 🆘 Where can I get help?

Expand Down
10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ repositories {
maven {
url = uri("https://repo.opencollab.dev/main/")
}

maven {
url = uri("https://repo.vulpescloud.de/snapshots")
}

}

dependencies {
Expand Down Expand Up @@ -56,6 +61,11 @@ dependencies {

compileOnly("org.geysermc.geyser:api:2.4.2-SNAPSHOT")
compileOnly("org.geysermc.floodgate:api:2.2.3-SNAPSHOT")

val vulpesCloudVersion = "1.0.0-alpha1"
compileOnly("de.vulpescloud", "VulpesCloud-api", vulpesCloudVersion)
compileOnly("de.vulpescloud", "VulpesCloud-bridge", vulpesCloudVersion)
compileOnly("de.vulpescloud", "VulpesCloud-wrapper", vulpesCloudVersion)
}

sourceSets {
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/de/bypixeltv/redivelocity/utils/CloudUtils.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package de.bypixeltv.redivelocity.utils;

import de.vulpescloud.wrapper.Wrapper;
import eu.cloudnetservice.driver.inject.InjectionLayer;
import eu.cloudnetservice.wrapper.holder.ServiceInfoHolder;
import eu.thesimplecloud.plugin.startup.CloudPlugin;
Expand All @@ -11,6 +12,8 @@ public static String getServiceName(String cloud) {
} else if (cloud.equalsIgnoreCase("cloudnet")) {
final ServiceInfoHolder serviceInfoHolder = InjectionLayer.ext().instance(ServiceInfoHolder.class);
return serviceInfoHolder.serviceInfo().name();
} else if (cloud.equalsIgnoreCase("vulpescloud")) {
return Wrapper.instance.getService().getName();
} else {
return null;
}
Expand Down

0 comments on commit 55f250a

Please sign in to comment.