2015-08-14 05:50:24 +00:00
|
|
|
package cn.citycraft.SimpleEssential.config;
|
|
|
|
|
|
|
|
import org.bukkit.plugin.Plugin;
|
|
|
|
|
2015-09-02 10:20:57 +00:00
|
|
|
import cn.citycraft.config.FileConfig;
|
2015-08-14 05:50:24 +00:00
|
|
|
|
2015-09-02 10:20:57 +00:00
|
|
|
public class Language {
|
|
|
|
private static String CONFIG_NAME = "language.yml";
|
|
|
|
private static FileConfig config;
|
2015-08-14 05:50:24 +00:00
|
|
|
|
2015-09-02 10:20:57 +00:00
|
|
|
public static String getMessage(String path) {
|
|
|
|
return config.getMessage(path);
|
2015-08-14 05:50:24 +00:00
|
|
|
}
|
|
|
|
|
2015-09-02 10:20:57 +00:00
|
|
|
public static String getMessage(String path, Object... args) {
|
2015-09-06 06:41:48 +00:00
|
|
|
return String.format(getMessage(path), args);
|
2015-08-14 05:50:24 +00:00
|
|
|
}
|
|
|
|
|
2015-09-02 10:20:57 +00:00
|
|
|
public static void load(Plugin p) {
|
|
|
|
config = new FileConfig(p, CONFIG_NAME);
|
2015-08-14 05:50:24 +00:00
|
|
|
}
|
|
|
|
}
|