forked from MirrorHub/authlib-injector
add authlibinjector.mojangAntiFeatures option
This commit is contained in:
parent
8fe84c802e
commit
565fc90dd7
13
README.en.md
13
README.en.md
|
@ -81,4 +81,17 @@ Configure Minecraft server with the following JVM parameter:
|
||||||
Do not show authentication server name in Minecraft menu screen.
|
Do not show authentication server name in Minecraft menu screen.
|
||||||
By default, authlib-injector alters --versionType parameter to display the authentication server name.
|
By default, authlib-injector alters --versionType parameter to display the authentication server name.
|
||||||
This feature can be disabled using this option.
|
This feature can be disabled using this option.
|
||||||
|
|
||||||
|
-Dauthlibinjector.mojangAntiFeatures={default|enabled|disabled}
|
||||||
|
Whether to turn on Minecraft's anti-features.
|
||||||
|
It's enabled by default if the authentication server does NOT send feature.enable_mojang_anti_features option.
|
||||||
|
|
||||||
|
These anti-features include:
|
||||||
|
- Minecraft server blocklist
|
||||||
|
- The API to query user privileges:
|
||||||
|
* Online chat (allowed if the option is disabled)
|
||||||
|
* Multiplayer (allowed if the option is disabled)
|
||||||
|
* Realms (allowed if the option is disabled)
|
||||||
|
* Telemetry (turned off if the option is disabled)
|
||||||
|
* Profanity filter (turned off if the option is disabled)
|
||||||
```
|
```
|
||||||
|
|
13
README.md
13
README.md
|
@ -88,6 +88,19 @@ gradle
|
||||||
-Dauthlibinjector.noShowServerName
|
-Dauthlibinjector.noShowServerName
|
||||||
不要在 Minecraft 主界面展示验证服务器名称.
|
不要在 Minecraft 主界面展示验证服务器名称.
|
||||||
默认情况下, authlib-injector 通过更改 --versionType 参数来在 Minecraft 主界面显示验证服务器名称, 使用本选项可以禁用该功能.
|
默认情况下, authlib-injector 通过更改 --versionType 参数来在 Minecraft 主界面显示验证服务器名称, 使用本选项可以禁用该功能.
|
||||||
|
|
||||||
|
-Dauthlibinjector.mojangAntiFeatures={default|enabled|disabled}
|
||||||
|
设置是否开启 Minecraft 的部分 anti-feature.
|
||||||
|
若验证服务器未设置 feature.enable_mojang_anti_features 选项, 则默认禁用.
|
||||||
|
|
||||||
|
Minecraft 的 anti-feature 包括:
|
||||||
|
- Minecraft 服务器屏蔽列表
|
||||||
|
- 查询用户权限的接口, 涵盖以下项目:
|
||||||
|
* 聊天权限 (禁用后默认允许)
|
||||||
|
* 多人游戏权限 (禁用后默认允许)
|
||||||
|
* 领域权限 (禁用后默认允许)
|
||||||
|
* 遥测 (禁用后默认关闭)
|
||||||
|
* 冒犯性内容过滤 (禁用后默认关闭)
|
||||||
```
|
```
|
||||||
|
|
||||||
## 捐助
|
## 捐助
|
||||||
|
|
|
@ -243,7 +243,10 @@ public final class AuthlibInjector {
|
||||||
log(INFO, "Disabled Mojang namespace");
|
log(INFO, "Disabled Mojang namespace");
|
||||||
}
|
}
|
||||||
|
|
||||||
filters.add(new AntiFeaturesFilter());
|
boolean mojangAntiFeaturesDefault = Boolean.TRUE.equals(config.getMeta().get("feature.enable_mojang_anti_features"));
|
||||||
|
if (!Config.mojangAntiFeatures.isEnabled(mojangAntiFeaturesDefault)) {
|
||||||
|
filters.add(new AntiFeaturesFilter());
|
||||||
|
}
|
||||||
|
|
||||||
return filters;
|
return filters;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2020 Haowei Wen <yushijinhun@gmail.com> and contributors
|
* Copyright (C) 2022 Haowei Wen <yushijinhun@gmail.com> and contributors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
@ -59,6 +59,7 @@ public final class Config {
|
||||||
public static Set<String> ignoredPackages;
|
public static Set<String> ignoredPackages;
|
||||||
public static FeatureOption mojangNamespace;
|
public static FeatureOption mojangNamespace;
|
||||||
public static FeatureOption legacySkinPolyfill;
|
public static FeatureOption legacySkinPolyfill;
|
||||||
|
public static FeatureOption mojangAntiFeatures;
|
||||||
public static boolean noShowServerName;
|
public static boolean noShowServerName;
|
||||||
|
|
||||||
private static void initDebugOptions() {
|
private static void initDebugOptions() {
|
||||||
|
@ -202,6 +203,7 @@ public final class Config {
|
||||||
|
|
||||||
mojangNamespace = parseFeatureOption("authlibinjector.mojangNamespace");
|
mojangNamespace = parseFeatureOption("authlibinjector.mojangNamespace");
|
||||||
legacySkinPolyfill = parseFeatureOption("authlibinjector.legacySkinPolyfill");
|
legacySkinPolyfill = parseFeatureOption("authlibinjector.legacySkinPolyfill");
|
||||||
|
mojangAntiFeatures = parseFeatureOption("authlibinjector.mojangAntiFeatures");
|
||||||
httpdDisabled = System.getProperty("authlibinjector.disableHttpd") != null;
|
httpdDisabled = System.getProperty("authlibinjector.disableHttpd") != null;
|
||||||
noShowServerName = System.getProperty("authlibinjector.noShowServerName") != null;
|
noShowServerName = System.getProperty("authlibinjector.noShowServerName") != null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue