-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added simplecloud support and made the plugin usable without a …
…cloud again
- Loading branch information
Showing
6 changed files
with
66 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/de/bypixeltv/redivelocity/utils/CloudUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package de.bypixeltv.redivelocity.utils; | ||
|
||
import eu.cloudnetservice.driver.inject.InjectionLayer; | ||
import eu.cloudnetservice.wrapper.holder.ServiceInfoHolder; | ||
import eu.thesimplecloud.plugin.startup.CloudPlugin; | ||
|
||
public class CloudUtils { | ||
public static String getServiceName(String cloud) { | ||
if (cloud.equalsIgnoreCase("simplecloud")) { | ||
return CloudPlugin.getInstance().thisService().getName(); | ||
} else if (cloud.equalsIgnoreCase("cloudnet")) { | ||
final ServiceInfoHolder serviceInfoHolder = InjectionLayer.ext().instance(ServiceInfoHolder.class); | ||
return serviceInfoHolder.serviceInfo().name(); | ||
} else { | ||
return null; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"id": "redivelocity", | ||
"name": "RediVelocity", | ||
"version": "1.0.3", | ||
"main": "de.bypixeltv.redivelocity.RediVelocity", | ||
"authors": ["byPixelTV"], | ||
"description": "A fast, modern and clean alternative to RedisBungee on Velocity.", | ||
"url": "https://bypixeltv.de" | ||
} |