Way for anyone to connect to Eaglercraft servers

This commit is contained in:
ayunami2000 2023-10-06 15:05:41 -04:00
parent af12ad126a
commit 350296d2bb
3 changed files with 17 additions and 1 deletions

View File

@ -12,6 +12,7 @@ public class FunnyConfig extends Config {
public static boolean premiumSkins = false;
public static boolean eaglerSkins = true;
public static boolean eaglerVoice = true;
public static int eaglerServerMode = 0;
protected FunnyConfig(File configFile) {
super(configFile);
@ -36,6 +37,10 @@ public class FunnyConfig extends Config {
if (item instanceof Boolean) {
eaglerVoice = (Boolean) item;
}
item = map.get("eagler-server-mode");
if (item instanceof Integer) {
eaglerServerMode = (Integer) item;
}
}
@Override

View File

@ -90,6 +90,12 @@ public class Main extends ViaProxyPlugin {
addr = ((ProxyConnection) proxyConnection).getServerAddress();
}
if (FunnyConfig.eaglerServerMode == 1) {
c2p.attr(secureWs).set(false);
} else if (FunnyConfig.eaglerServerMode == 2) {
c2p.attr(secureWs).set(true);
}
if (c2p.hasAttr(secureWs)) {
doWsServerStuff(ch, proxyConnection, c2p, addr);
if (!event.isLegacyPassthrough()) {

View File

@ -4,3 +4,8 @@ premium-skins: false
eagler-skins: true
# Enable Eagler voice chat
eagler-voice: true
# Eaglercraft server mode
# 0 - Default (non-Eaglercraft)
# 1 - Force non-secure (ws)
# 2 - Force secure (wss)
eagler-server-mode: 0