mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-30 06:33:56 +01:00
This is why you don't use the github web interface
This commit is contained in:
parent
735afe277c
commit
4144953dff
@ -9,6 +9,8 @@ import net.citizensnpcs.api.util.Storage;
|
|||||||
import net.citizensnpcs.api.util.YamlStorage;
|
import net.citizensnpcs.api.util.YamlStorage;
|
||||||
import net.citizensnpcs.util.Messaging;
|
import net.citizensnpcs.util.Messaging;
|
||||||
|
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
public class Settings {
|
public class Settings {
|
||||||
private final Storage config;
|
private final Storage config;
|
||||||
private final DataKey root;
|
private final DataKey root;
|
||||||
@ -93,7 +95,7 @@ public class Settings {
|
|||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<String> asList() {
|
public List<String> asList() {
|
||||||
if (value instanceof String) {
|
if (!(value instanceof List)) {
|
||||||
value = Lists.newArrayList(value);
|
value = Lists.newArrayList(value);
|
||||||
}
|
}
|
||||||
return (List<String>) value;
|
return (List<String>) value;
|
||||||
@ -110,7 +112,7 @@ public class Settings {
|
|||||||
protected void set(DataKey root) {
|
protected void set(DataKey root) {
|
||||||
root.setRaw(path, value);
|
root.setRaw(path, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void load(DataKey root) {
|
protected void load(DataKey root) {
|
||||||
value = root.getRaw(path);
|
value = root.getRaw(path);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user