Skip to content

Commit

Permalink
[F] Fixed a critial bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ClayCoffee committed Aug 30, 2020
1 parent eff15b2 commit 9a64e12
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 28 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ClayTech.iml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/cn/claycoffee/ClayTech/ClayTech.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -197,6 +197,7 @@ public void onEnable() {
}
currentLangYML.saveCustomConfig();
currentLangYML.reloadCustomConfig();
Lang.init();
switch (version) {
case "v1_16_R2":
break;
Expand Down
50 changes: 33 additions & 17 deletions src/main/java/cn/claycoffee/ClayTech/utils/Lang.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down

1 comment on commit 9a64e12

@ClayCoffee
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Please sign in to comment.