Merge branch 'dev' into scrapper
This commit is contained in:
commit
1938a690c6
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>net.knarcraft</groupId>
|
||||
<artifactId>blacksmith</artifactId>
|
||||
<version>1.0.4-SNAPSHOT</version>
|
||||
<version>1.0.5</version>
|
||||
<name>Blacksmith</name>
|
||||
<description>Blacksmith NPC for the Citizens API</description>
|
||||
|
||||
|
@ -109,9 +109,9 @@ public class BlacksmithPlugin extends JavaPlugin {
|
||||
|
||||
//Copy default config to disk
|
||||
FileConfiguration fileConfiguration = this.getConfig();
|
||||
fileConfiguration.options().copyDefaults(true);
|
||||
this.saveDefaultConfig();
|
||||
this.reloadConfig();
|
||||
fileConfiguration.options().copyDefaults(true);
|
||||
this.saveConfig();
|
||||
|
||||
//Load settings
|
||||
|
@ -19,6 +19,9 @@ public final class ConfigHelper {
|
||||
* @return <p>The value as a string list, or null if not compatible</p>
|
||||
*/
|
||||
public static List<String> asStringList(Object value) {
|
||||
if (value == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
if (value instanceof String) {
|
||||
return List.of(((String) value).split(","));
|
||||
} else if (value instanceof List<?> list) {
|
||||
|
Loading…
Reference in New Issue
Block a user