From 1a41c42ba99f2798c02fa91c2408a260821c5fed Mon Sep 17 00:00:00 2001 From: initsuj Date: Tue, 1 Mar 2016 19:20:05 -0700 Subject: [PATCH] Cache settings are written and parsed. --- MinecraftClient/Cache/AuthCacheHandler.cs | 12 ++++++++++++ MinecraftClient/Settings.cs | 10 ++++++++++ 2 files changed, 22 insertions(+) create mode 100644 MinecraftClient/Cache/AuthCacheHandler.cs diff --git a/MinecraftClient/Cache/AuthCacheHandler.cs b/MinecraftClient/Cache/AuthCacheHandler.cs new file mode 100644 index 00000000..8b1748b1 --- /dev/null +++ b/MinecraftClient/Cache/AuthCacheHandler.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace MinecraftClient.Cache +{ + public static class AuthCacheHandler + { + public enum Type { NONE, MEMORY, DISK }; + } +} diff --git a/MinecraftClient/Settings.cs b/MinecraftClient/Settings.cs index 7b0ffe88..51972956 100644 --- a/MinecraftClient/Settings.cs +++ b/MinecraftClient/Settings.cs @@ -29,6 +29,9 @@ namespace MinecraftClient public static string SingleCommand = ""; public static string ConsoleTitle = ""; + //Cache Settings + public static Cache.AuthCacheHandler.Type CacheType = Cache.AuthCacheHandler.Type.NONE; + //Proxy Settings public static bool ProxyEnabledLogin = false; public static bool ProxyEnabledIngame = false; @@ -200,6 +203,12 @@ namespace MinecraftClient } break; + case "accountcache": + if(argValue == "none") { CacheType = Cache.AuthCacheHandler.Type.NONE; } + else if(argValue == "memory") { CacheType = Cache.AuthCacheHandler.Type.MEMORY; } + else if(argValue == "disk") { CacheType = Cache.AuthCacheHandler.Type.DISK; } + break; + case "accountlist": if (File.Exists(argValue)) { @@ -416,6 +425,7 @@ namespace MinecraftClient + "showsystemmessages=true #system messages for server ops\r\n" + "showxpbarmessages=true #messages displayed above xp bar\r\n" + "terrainandmovements=false #uses more ram, cpu, bandwidth\r\n" + + "accountcache=none #use 'none', 'memory' or 'disk'\r\n" + "accountlist=accounts.txt\r\n" + "serverlist=servers.txt\r\n" + "playerheadicon=true\r\n"