mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
initGson в ServerWrapper
This commit is contained in:
parent
b70e781fa7
commit
3fe5a34029
1 changed files with 8 additions and 0 deletions
|
@ -77,6 +77,13 @@ public static boolean loopAuth(ServerWrapper wrapper, int count, int sleeptime)
|
|||
return false;
|
||||
}
|
||||
|
||||
public static void initGson()
|
||||
{
|
||||
if(Launcher.gson != null) return;
|
||||
Launcher.gsonBuilder = new GsonBuilder();
|
||||
Launcher.gson = Launcher.gsonBuilder.create();
|
||||
}
|
||||
|
||||
@SuppressWarnings("ConfusingArgumentToVarargsMethod")
|
||||
public static void main(String[] args) throws Throwable {
|
||||
ServerWrapper wrapper = new ServerWrapper();
|
||||
|
@ -90,6 +97,7 @@ public static void main(String[] args) throws Throwable {
|
|||
gsonBuiler = new GsonBuilder();
|
||||
gsonBuiler.setPrettyPrinting();
|
||||
gson = gsonBuiler.create();
|
||||
initGson();
|
||||
generateConfigIfNotExists();
|
||||
try(Reader reader = IOHelper.newReader(configFile))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue