From 9a64e122ccb98757bb6ccf0f507a75e436b24e8a Mon Sep 17 00:00:00 2001
From: ClayCoffee <1020757140@qq.com>
Date: Sun, 30 Aug 2020 08:58:11 +0800
Subject: [PATCH] [F] Fixed a critial bug

---
 ...t_Slimefun4_master_RC_7_g2a13216_1730.xml} |  8 +--
 ...igotmc_spigot_api_1_16_2_R0_1_SNAPSHOT.xml |  6 +--
 ClayTech.iml                                  |  2 +-
 pom.xml                                       |  2 +-
 .../java/cn/claycoffee/ClayTech/ClayTech.java |  3 +-
 .../cn/claycoffee/ClayTech/utils/Lang.java    | 50 ++++++++++++-------
 src/main/resources/plugin.yml                 |  2 +-
 7 files changed, 45 insertions(+), 28 deletions(-)
 rename .idea/libraries/{Maven__com_github_TheBusyBiscuit_Slimefun4_master_RC_7_gf97935b_1718.xml => Maven__com_github_TheBusyBiscuit_Slimefun4_master_RC_7_g2a13216_1730.xml} (57%)

diff --git a/.idea/libraries/Maven__com_github_TheBusyBiscuit_Slimefun4_master_RC_7_gf97935b_1718.xml b/.idea/libraries/Maven__com_github_TheBusyBiscuit_Slimefun4_master_RC_7_g2a13216_1730.xml
similarity index 57%
rename from .idea/libraries/Maven__com_github_TheBusyBiscuit_Slimefun4_master_RC_7_gf97935b_1718.xml
rename to .idea/libraries/Maven__com_github_TheBusyBiscuit_Slimefun4_master_RC_7_g2a13216_1730.xml
index 0dee6ca..030a46b 100644
--- a/.idea/libraries/Maven__com_github_TheBusyBiscuit_Slimefun4_master_RC_7_gf97935b_1718.xml
+++ b/.idea/libraries/Maven__com_github_TheBusyBiscuit_Slimefun4_master_RC_7_g2a13216_1730.xml
@@ -1,13 +1,13 @@
 <component name="libraryTable">
-  <library name="Maven: com.github.TheBusyBiscuit:Slimefun4:master-RC-7-gf97935b-1718">
+  <library name="Maven: com.github.TheBusyBiscuit:Slimefun4:master-RC-7-g2a13216-1730">
     <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/com/github/TheBusyBiscuit/Slimefun4/master-RC-7-gf97935b-1718/Slimefun4-master-RC-7-gf97935b-1718.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/TheBusyBiscuit/Slimefun4/master-RC-7-g2a13216-1730/Slimefun4-master-RC-7-g2a13216-1730.jar!/" />
     </CLASSES>
     <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/com/github/TheBusyBiscuit/Slimefun4/master-RC-7-gf97935b-1718/Slimefun4-master-RC-7-gf97935b-1718-javadoc.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/TheBusyBiscuit/Slimefun4/master-RC-7-g2a13216-1730/Slimefun4-master-RC-7-g2a13216-1730-javadoc.jar!/" />
     </JAVADOC>
     <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/com/github/TheBusyBiscuit/Slimefun4/master-RC-7-gf97935b-1718/Slimefun4-master-RC-7-gf97935b-1718-sources.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/TheBusyBiscuit/Slimefun4/master-RC-7-g2a13216-1730/Slimefun4-master-RC-7-g2a13216-1730-sources.jar!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_spigotmc_spigot_api_1_16_2_R0_1_SNAPSHOT.xml b/.idea/libraries/Maven__org_spigotmc_spigot_api_1_16_2_R0_1_SNAPSHOT.xml
index 435bb1a..0a540ae 100644
--- a/.idea/libraries/Maven__org_spigotmc_spigot_api_1_16_2_R0_1_SNAPSHOT.xml
+++ b/.idea/libraries/Maven__org_spigotmc_spigot_api_1_16_2_R0_1_SNAPSHOT.xml
@@ -1,13 +1,13 @@
 <component name="libraryTable">
   <library name="Maven: org.spigotmc:spigot-api:1.16.2-R0.1-SNAPSHOT">
     <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.16.2-R0.1-SNAPSHOT/spigot-api-1.16.2-R0.1-20200828.084614-46.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.16.2-R0.1-SNAPSHOT/spigot-api-1.16.2-R0.1-20200829.041313-47.jar!/" />
     </CLASSES>
     <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.16.2-R0.1-SNAPSHOT/spigot-api-1.16.2-R0.1-20200828.084614-46-javadoc.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.16.2-R0.1-SNAPSHOT/spigot-api-1.16.2-R0.1-20200829.041313-47-javadoc.jar!/" />
     </JAVADOC>
     <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.16.2-R0.1-SNAPSHOT/spigot-api-1.16.2-R0.1-20200828.084614-46-sources.jar!/" />
+      <root url="jar://$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.16.2-R0.1-SNAPSHOT/spigot-api-1.16.2-R0.1-20200829.041313-47-sources.jar!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/ClayTech.iml b/ClayTech.iml
index 1727888..73f3afa 100644
--- a/ClayTech.iml
+++ b/ClayTech.iml
@@ -20,7 +20,7 @@
     <orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
     <orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TheBusyBiscuit:CS-CoreLib:master-v1.6.1-g9dd4a1c-118" level="project" />
     <orderEntry type="library" name="Maven: com.github.Multiverse:Multiverse-Core:3afca50930" level="project" />
-    <orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TheBusyBiscuit:Slimefun4:master-RC-7-gf97935b-1718" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TheBusyBiscuit:Slimefun4:master-RC-7-g2a13216-1730" level="project" />
     <orderEntry type="module-library">
       <library name="Maven: org.eclipse.jdt:Anotation:2.2.400">
         <CLASSES>
diff --git a/pom.xml b/pom.xml
index 8290999..78f4e54 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>club.claycoffee</groupId>
     <artifactId>ClayTech</artifactId>
-    <version>1.2.13</version>
+    <version>1.2.14</version>
     <build>
         <plugins>
             <plugin>
diff --git a/src/main/java/cn/claycoffee/ClayTech/ClayTech.java b/src/main/java/cn/claycoffee/ClayTech/ClayTech.java
index 0fc244c..6f5990b 100644
--- a/src/main/java/cn/claycoffee/ClayTech/ClayTech.java
+++ b/src/main/java/cn/claycoffee/ClayTech/ClayTech.java
@@ -108,7 +108,7 @@ public void onEnable() {
         if (highrailspeed == null)
             highrailspeed = "3";
         if (!Utils.ExitsInList(locale, Lang.LocaleList)) {
-            Utils.info("§cLoading Error: Locale not found.Disableing plugin..");
+            Utils.info("§cLoading Error: Locale not found.Disabling plugin..");
             this.getServer().getPluginManager().disablePlugin(this);
         }
         // config
@@ -197,6 +197,7 @@ public void onEnable() {
         }
         currentLangYML.saveCustomConfig();
         currentLangYML.reloadCustomConfig();
+        Lang.init();
         switch (version) {
             case "v1_16_R2":
                 break;
diff --git a/src/main/java/cn/claycoffee/ClayTech/utils/Lang.java b/src/main/java/cn/claycoffee/ClayTech/utils/Lang.java
index 4d80c66..317ddb6 100644
--- a/src/main/java/cn/claycoffee/ClayTech/utils/Lang.java
+++ b/src/main/java/cn/claycoffee/ClayTech/utils/Lang.java
@@ -8,23 +8,39 @@
 
 public class Lang {
     public static String[] LocaleList = {"zh-CN", "zh-TW", "en-GB", "en-US", "ja"};
-    public static String cantPlace = readGeneralText("CantPlaceLore");
-    public static String blindFive = readGeneralText("Blind_5_effect");
-    public static String slownessFive = readGeneralText("Slowness_5_effect");
-    public static String confusionFive = readGeneralText("Confusion_5_effect");
-    public static String poisonThree = readGeneralText("Poison_3_effect");
-    public static String antiSlownessThree = readGeneralText("Anti_Slowness_5_effect");
-    public static String durability = readGeneralText("Durability");
-    public static String cantEat = readGeneralText("CantEat");
-    public static String cantInteract = readGeneralText("CantInteract");
-    public static String rocketPrefix = readGeneralText("Rocket");
-    public static String spaceSuitPrefix = readGeneralText("SpaceSuit");
-    public static String fuelPrefix = readGeneralText("Fuel");
-    public static String oxygenPrefix = readGeneralText("Oxygen");
-    public static String protectLevel = readGeneralText("ProtectLevel");
-    public static String oxygenDistributerPrefix = readGeneralText("OxygenDistributer");
-
-
+    public static String cantPlace;
+    public static String blindFive;
+    public static String slownessFive;
+    public static String confusionFive;
+    public static String poisonThree;
+    public static String antiSlownessThree;
+    public static String durability;
+    public static String cantEat;
+    public static String cantInteract;
+    public static String rocketPrefix;
+    public static String spaceSuitPrefix;
+    public static String fuelPrefix;
+    public static String oxygenPrefix;
+    public static String protectLevel;
+    public static String oxygenDistributerPrefix;
+
+    public static void init() {
+        cantPlace = readGeneralText("CantPlaceLore");
+        blindFive = readGeneralText("Blind_5_effect");
+        slownessFive = readGeneralText("Slowness_5_effect");
+        confusionFive = readGeneralText("Confusion_5_effect");
+        poisonThree = readGeneralText("Poison_3_effect");
+        antiSlownessThree = readGeneralText("Anti_Slowness_5_effect");
+        durability = readGeneralText("Durability");
+        cantEat = readGeneralText("CantEat");
+        cantInteract = readGeneralText("CantInteract");
+        rocketPrefix = readGeneralText("Rocket");
+        spaceSuitPrefix = readGeneralText("SpaceSuit");
+        fuelPrefix = readGeneralText("Fuel");
+        oxygenPrefix = readGeneralText("Oxygen");
+        protectLevel = readGeneralText("ProtectLevel");
+        oxygenDistributerPrefix = readGeneralText("OxygenDistributer");
+    }
 
     public static String readItemText(String name) {
         if (ClayTech.getLangYML().getCustomConfig().getString("Items." + name) == null) {
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index ea4ae47..dfd1aa9 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -1,6 +1,6 @@
 name: ClayTech
 main: cn.claycoffee.ClayTech.ClayTech
-version: 1.2.13
+version: 1.2.14
 api-version: 1.13
 author: ClayCoffee
 loadbefore: [Multiverse-Core]