improve updater

Former-commit-id: 975b9ba2720529d2ac8b5e4b528df848a2e1a32e [formerly 17247629c26f4ac48554f0f39a2ffc6a55826a16]
Former-commit-id: 6d2a62fa58637188407db2365cc0ab07ecba8558
This commit is contained in:
Ghost_chu committed 2018-11-16 20:05:12 +08:00
1 parent 9559effc36
commit f22ea61e75
2 files changed
+10 -4

No files matched your search

@@ -159,6 +159,8 @@ public class QuickShop extends JavaPlugin {
if (mPlugin != null) {
getLogger().info("Successfully loaded MultiverseCore support!");
}
if(getConfig().getInt("config-version")==0)
getConfig().set("config-version", 1);
updateConfig(getConfig().getInt("config-version"));
// Initialize Util
@@ -40,6 +40,7 @@ public class MsgUtil {
private static YamlConfiguration enchi18n;
private static YamlConfiguration potioni18n;
private static HashMap<UUID, LinkedList<String>> player_messages = new HashMap<UUID, LinkedList<String>>();
private static boolean Inited;
/**
* Loads all the messages from messages.yml
*/
@@ -71,10 +72,13 @@ public class MsgUtil {
updateMessages(messages.getInt("language-version"));
//Print language copyright infomation
plugin.getLogger().info(messages.getString("language-author"));
plugin.getLogger().info(messages.getString("language-contributors"));
plugin.getLogger().info(messages.getString("language-country"));
plugin.getLogger().info(messages.getString("language-version"));
if(!Inited) {
plugin.getLogger().info(messages.getString("language-author"));
plugin.getLogger().info(messages.getString("language-contributors"));
plugin.getLogger().info(messages.getString("language-country"));
plugin.getLogger().info(messages.getString("language-version"));
Inited=true;
}
}
public static void updateMessages(int selectedVersion) {