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