Files
HMCL/HMCLAPI/src/main/java/org/jackhuang/hellominecraft/C.java

59 lines
2.3 KiB
Java
Raw Normal View History

2015-06-22 16:47:05 +08:00
/*
2015-06-22 17:25:47 +08:00
* Copyright 2013 huangyuhui <huanghongxun2008@126.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.
2015-06-22 16:47:05 +08:00
*/
package org.jackhuang.hellominecraft;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.util.ResourceBundle;
/**
*
* @author huangyuhui
2015-06-22 16:47:05 +08:00
*/
public final class C {
public static final Gson gsonPrettyPrinting = new GsonBuilder().setPrettyPrinting().create();
public static final Gson gson = new Gson();
public static final ResourceBundle I18N = ResourceBundle.getBundle("org/jackhuang/hellominecraft/launcher/I18N");
//http://repo1.maven.org/maven2
public static final String URL_PUBLISH = "http://www.mcbbs.net/thread-142335-1-1.html";
public static final String URL_TIEBA = "http://tieba.baidu.com/f?kw=hellominecraftlauncher";
2015-06-24 13:45:00 +08:00
public static final String URL_GITHUB = "https://github.com/huanghongxun/HMCL/issues";
2015-06-22 16:47:05 +08:00
public static final String URL_MINECRAFTFORUM = "http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tools/1265720-hello-minecraft-launcher-1-9-3-mc-1-7-4-auto";
public static final String FILE_MINECRAFT_VERSIONS = "versions";
public static final String LINE_SEPARATOR = System.getProperty("line.separator");
public static final String URL_FORGE_LIST = "http://files.minecraftforge.net/maven/net/minecraftforge/forge/json";
public static final String URL_LITELOADER_LIST = "http://dl.liteloader.com/versions/versions.json";
private C(){}
public static String i18n(String a, Object... format) {
try {
return String.format(C.I18N.getString(a), format);
} catch(Exception e) {
HMCLog.warn("Failed to read localization lang: " + a, e);
return a;
}
}
}