Skip to content

Commit

Permalink
Merge pull request #58 from Andre601/fix/flamecord-compatability
Browse files Browse the repository at this point in the history
Fix issue with FlameCord compatability
  • Loading branch information
Andre601 authored May 31, 2021
2 parents 4810048 + 907cf39 commit 15a9311
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,15 @@ public Path getPath(){
@Override
public ProxyPlatform getProxyPlatform(){
try{
Class.forName("io.github.waterfallmc.waterfall.conf.WaterfallConfiguration");
return ProxyPlatform.WATERFALL;
}catch(ClassNotFoundException ex){
return ProxyPlatform.BUNGEECORD;
Class.forName("dev._21studios.flamecord.FlameCord");
return ProxyPlatform.FLAMECORD;
}catch(ClassNotFoundException ignored){
try{
Class.forName("io.github.waterfallmc.waterfall.conf.WaterfallConfiguration");
return ProxyPlatform.WATERFALL;
}catch(ClassNotFoundException ignored1){
return ProxyPlatform.BUNGEECORD;
}
}
}

Expand All @@ -108,6 +113,11 @@ public String getVersion(){
@Override
public String getProxyVersion(){
String[] version = getProxy().getVersion().split(":");
if(version.length <= 0)
return "UNKNOWN";

if(version.length == 1)
return version[0];

return String.format("%s (Build #%s)", version[2], version[4]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
public enum ProxyPlatform{

BUNGEECORD ("BungeeCord"),
FLAMECORD ("FlameCord"),
WATERFALL ("Waterfall"),
VELOCITY ("Velocity 2"),
VELOCITY_LEGACY("Velocity");
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<plugin.version>3.5.1</plugin.version>
<plugin.version>3.5.2</plugin.version>
<plugin.description>Only allow specific client versions on your Network.</plugin.description>

<maven.compiler.target>11</maven.compiler.target>
Expand Down
36 changes: 18 additions & 18 deletions wiki/Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,24 +115,24 @@ Depending on the config option are either only [basic](#basic-formatting) or [ad

##### Colors

| Option 1 | Option 2 |
| -------------------------- | -------------------------------- |
| [`<aqua>`][colors] | [`<color:aqua>`][colors] |
| [`<black>`][colors] | [`<color:black>`][colors] |
| [`<blue>`][colors] | [`<color:blue>`][colors] |
| [`<dark_aqua>`][colors] | [`<color:dark_aqua>`][colors] |
| [`<dark_blue>`][colors] | [`<color:dark_blue>`][colors] |
| [`<dark_gray>`][colors] | [`<color:dark_gray>`][colors] |
| [`<dark_green>`][colors] | [`<color:dark_green>`][colors] |
| [`<dark_purple>`][colors] | [`<color:dark_purple>`][colors] |
| [`<dark_red>`][colors] | [`<color:dark_red>`][colors] |
| [`<gold>`][colors] | [`<color:gold>`][colors] |
| [`<gray>`][colors] | [`<color:gray>`][colors] |
| [`<green>`][colors] | [`<color:green>`][colors] |
| [`<light_purple>`][colors] | [`<color:light_purple>`][colors] |
| [`<red>`][colors] | [`<color:red>`][colors] |
| [`<white>`][colors] | [`<color:white>`][colors] |
| [`<yellow>`][colors] | [`<color:yellow>`][colors] |
| Option 1 | Option 2 |
| ----------------------------------------------- | ----------------------------------------------------------- |
| [`<aqua>`][colors] | [`<color:aqua>`][colors] |
| [`<black>`][colors] | [`<color:black>`][colors] |
| [`<blue>`][colors] | [`<color:blue>`][colors] |
| [`<dark_aqua>`][colors] | [`<color:dark_aqua>`][colors] |
| [`<dark_blue>`][colors] | [`<color:dark_blue>`][colors] |
| [`<dark_gray>`][colors]/[`<dark_grey>`][colors] | [`<color:dark_gray>`][colors]/[`<color:dark_grey>`][colors] |
| [`<dark_green>`][colors] | [`<color:dark_green>`][colors] |
| [`<dark_purple>`][colors] | [`<color:dark_purple>`][colors] |
| [`<dark_red>`][colors] | [`<color:dark_red>`][colors] |
| [`<gold>`][colors] | [`<color:gold>`][colors] |
| [`<gray>`][colors] | [`<color:gray>`][colors] |
| [`<green>`][colors] | [`<color:green>`][colors] |
| [`<light_purple>`][colors] | [`<color:light_purple>`][colors] |
| [`<red>`][colors] | [`<color:red>`][colors] |
| [`<white>`][colors] | [`<color:white>`][colors] |
| [`<yellow>`][colors] | [`<color:yellow>`][colors] |

##### Formatting

Expand Down

0 comments on commit 15a9311

Please sign in to comment.