Add a fix for #42 that doesn't involve deleting the configuration files
Also add link default language.yml to the readme.
This commit is contained in:
parent
d94907128f
commit
01efec4092
|
@ -9,10 +9,13 @@ SpigotMC Plugin that gives you the ability to tame foxes!
|
|||
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
|
||||
```
|
||||
|
||||
### <a href="https://github.com/SeanOMik/TamableFoxes/blob/master/Plugin/src/main/resources/config.yml">Default Config</a>
|
||||
|
||||
### Default configurations:
|
||||
* <a href="https://github.com/SeanOMik/TamableFoxes/blob/master/Plugin/src/main/resources/config.yml">Default config.yml</a>
|
||||
* <a href="https://github.com/SeanOMik/TamableFoxes/blob/master/Plugin/src/main/resources/language.yml">Default language.yml</a>
|
||||
<br>
|
||||
|
||||
If you get any errors, <a href="https://github.com/SeanOMik/TamableFoxes/issues/new">create an issue!</a><br><br>
|
||||
|
||||
Have you ever wanted to tame foxes? Well, now you can! Use chicken to tame and sweet berries to breed them!<br><br>
|
||||
|
||||
### Features:
|
||||
|
|
|
@ -79,9 +79,13 @@ public class LanguageConfig extends YamlConfiguration {
|
|||
@Override
|
||||
public String getString(String path) {
|
||||
// Only attempt to translate if the text is not empty.
|
||||
if (contains(path)) {
|
||||
return (super.getString(path).isEmpty()) ? super.getString(path) : ChatColor.translateAlternateColorCodes('&', super.getString(path));
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
// This is the text that shows when registering the custom entity
|
||||
public static String getMCVersionLoading(String mcVersionStr) {
|
||||
return config.getString("mc-version-loading").replaceAll("%MC_VERSION%", mcVersionStr);
|
||||
|
|
Loading…
Reference in New Issue