mirror of
https://github.com/ayunami2000/ayunViaProxyEagUtils.git
synced 2024-11-09 06:16:04 -08:00
Way for anyone to connect to Eaglercraft servers
This commit is contained in:
parent
af12ad126a
commit
350296d2bb
|
@ -12,6 +12,7 @@ public class FunnyConfig extends Config {
|
||||||
public static boolean premiumSkins = false;
|
public static boolean premiumSkins = false;
|
||||||
public static boolean eaglerSkins = true;
|
public static boolean eaglerSkins = true;
|
||||||
public static boolean eaglerVoice = true;
|
public static boolean eaglerVoice = true;
|
||||||
|
public static int eaglerServerMode = 0;
|
||||||
|
|
||||||
protected FunnyConfig(File configFile) {
|
protected FunnyConfig(File configFile) {
|
||||||
super(configFile);
|
super(configFile);
|
||||||
|
@ -36,6 +37,10 @@ public class FunnyConfig extends Config {
|
||||||
if (item instanceof Boolean) {
|
if (item instanceof Boolean) {
|
||||||
eaglerVoice = (Boolean) item;
|
eaglerVoice = (Boolean) item;
|
||||||
}
|
}
|
||||||
|
item = map.get("eagler-server-mode");
|
||||||
|
if (item instanceof Integer) {
|
||||||
|
eaglerServerMode = (Integer) item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -90,6 +90,12 @@ public class Main extends ViaProxyPlugin {
|
||||||
addr = ((ProxyConnection) proxyConnection).getServerAddress();
|
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)) {
|
if (c2p.hasAttr(secureWs)) {
|
||||||
doWsServerStuff(ch, proxyConnection, c2p, addr);
|
doWsServerStuff(ch, proxyConnection, c2p, addr);
|
||||||
if (!event.isLegacyPassthrough()) {
|
if (!event.isLegacyPassthrough()) {
|
||||||
|
|
|
@ -4,3 +4,8 @@ premium-skins: false
|
||||||
eagler-skins: true
|
eagler-skins: true
|
||||||
# Enable Eagler voice chat
|
# Enable Eagler voice chat
|
||||||
eagler-voice: true
|
eagler-voice: true
|
||||||
|
# Eaglercraft server mode
|
||||||
|
# 0 - Default (non-Eaglercraft)
|
||||||
|
# 1 - Force non-secure (ws)
|
||||||
|
# 2 - Force secure (wss)
|
||||||
|
eagler-server-mode: 0
|
Loading…
Reference in New Issue
Block a user