mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Now user didn't need reset file to regen language file
Former-commit-id: 9e3e33ae92a4eb4db733936612ecd6fb3d0dacb0
This commit is contained in:
1 parent
87d7d268cf
commit
d1c83069f3
1 file changed
+13
-2
@@ -874,8 +874,19 @@ public class MsgUtil {
|
||||
}
|
||||
|
||||
@SuppressWarnings("UnusedAssignment")
|
||||
private static void updateMessages(int selectedVersion) throws IOException {
|
||||
|
||||
private static void updateMessages(int selectedVersion) {
|
||||
String languageName = plugin.getConfig()
|
||||
.getString("language", "en");
|
||||
if(!messagei18n.getString("language-name").isPresent()){
|
||||
setAndUpdate("language-name",languageName);
|
||||
}
|
||||
if(!messagei18n.getString("language-name").get().equals(languageName)){
|
||||
new File(plugin.getDataFolder(),"messages.json").delete();
|
||||
try {
|
||||
loadCfgMessages();
|
||||
}catch (Exception ignore){}
|
||||
return;
|
||||
}
|
||||
if (selectedVersion == 1) {
|
||||
setAndUpdate("shop-not-exist", "&cThere had no shop.");
|
||||
setAndUpdate("controlpanel.infomation", "&aShop Control Panel:");
|
||||
|
||||
Reference in new issue
Block a user