3
0

Add option to disable printing client's mod list (close #98)

This commit is contained in:
Prototik 2015-07-12 13:54:53 +07:00
parent 664666ef68
commit fbdf884b96
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,15 @@
--- ../src-base/minecraft/cpw/mods/fml/common/network/handshake/FMLHandshakeServerState.java
+++ ../src-work/minecraft/cpw/mods/fml/common/network/handshake/FMLHandshakeServerState.java
@@ -37,7 +37,11 @@
}
FMLHandshakeMessage.ModList client = (FMLHandshakeMessage.ModList)msg;
- FMLLog.info("Client attempting to join with %d mods : %s", client.modListSize(), client.modListAsString());
+ if (net.minecraft.server.MinecraftServer.kcauldronConfig.loggingClientModList.getValue()) {
+ FMLLog.info("Client attempting to join with %d mods : %s", client.modListSize(), client.modListAsString());
+ } else {
+ FMLLog.info("Client attempting to join with %d mods", client.modListSize());
+ }
String result = FMLNetworkHandler.checkModList(client, Side.CLIENT);
if (result != null)
{

View File

@ -24,6 +24,8 @@ public class KCauldronConfig extends ConfigBase {
public BoolSetting loggingMaterialInjection = new BoolSetting(this,
"logging.materialInjection", false, "Log material injection event");
public BoolSetting loggingClientModList = new BoolSetting(this,
"logging.clientModList", true, "Print client's mod list during attempt to join");
public BoolSetting commonAllowNetherPortal = new BoolSetting(this,
"common.allowNetherPortalBesidesOverworld", false, "Allow nether portals in dimensions besides overworld");
@ -37,6 +39,7 @@ public class KCauldronConfig extends ConfigBase {
register(updatecheckerAutorestart);
register(updatecheckerQuite);
register(loggingMaterialInjection);
register(loggingClientModList);
register(commonAllowNetherPortal);
load();
}