mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-01 05:54:05 +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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void initGson()
|
||||||
|
{
|
||||||
|
if(Launcher.gson != null) return;
|
||||||
|
Launcher.gsonBuilder = new GsonBuilder();
|
||||||
|
Launcher.gson = Launcher.gsonBuilder.create();
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings("ConfusingArgumentToVarargsMethod")
|
@SuppressWarnings("ConfusingArgumentToVarargsMethod")
|
||||||
public static void main(String[] args) throws Throwable {
|
public static void main(String[] args) throws Throwable {
|
||||||
ServerWrapper wrapper = new ServerWrapper();
|
ServerWrapper wrapper = new ServerWrapper();
|
||||||
|
@ -90,6 +97,7 @@ public static void main(String[] args) throws Throwable {
|
||||||
gsonBuiler = new GsonBuilder();
|
gsonBuiler = new GsonBuilder();
|
||||||
gsonBuiler.setPrettyPrinting();
|
gsonBuiler.setPrettyPrinting();
|
||||||
gson = gsonBuiler.create();
|
gson = gsonBuiler.create();
|
||||||
|
initGson();
|
||||||
generateConfigIfNotExists();
|
generateConfigIfNotExists();
|
||||||
try(Reader reader = IOHelper.newReader(configFile))
|
try(Reader reader = IOHelper.newReader(configFile))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue