Skip to content

Commit

Permalink
Fix issue with FlameCord compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre601 committed May 31, 2021
1 parent 4810048 commit 68b397b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 22 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
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 68b397b

Please sign in to comment.