Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c75b9c2328 | ||
|
|
0863db8cf0 | ||
|
|
53d6a272e6 |
No files matched your search
@@ -1,3 +1,7 @@
|
||||
5.2.2:
|
||||
- Changed configuration saving so empty lists will be added to
|
||||
the configuration files.
|
||||
|
||||
5.2.1:
|
||||
- Add region bounds to /region info
|
||||
- Added the ability to add owners/members to the global region for
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.sk89q</groupId>
|
||||
<artifactId>worldguard</artifactId>
|
||||
<version>5.2.1</version>
|
||||
<version>5.2.2</version>
|
||||
<name>WorldGuard</name>
|
||||
<description>WorldGuard protects your Minecraft servers</description>
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.sk89q.worldguard.chest.SignChestProtection;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -201,19 +202,35 @@ public class WorldConfiguration {
|
||||
}
|
||||
|
||||
private List<Integer> getIntList(String node, List<Integer> def) {
|
||||
List<Integer> res;
|
||||
|
||||
if (config.getProperty(node) != null) {
|
||||
return config.getIntList(node, def);
|
||||
res = config.getIntList(node, def);
|
||||
} else {
|
||||
return parentConfig.getIntList(node, def);
|
||||
res = parentConfig.getIntList(node, def);
|
||||
}
|
||||
|
||||
if (res == null || res.size() == 0) {
|
||||
parentConfig.setProperty(node, new ArrayList<Integer>());
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
private List<String> getStringList(String node, List<String> def) {
|
||||
List<String> res;
|
||||
|
||||
if (config.getProperty(node) != null) {
|
||||
return config.getStringList(node, def);
|
||||
res = config.getStringList(node, def);
|
||||
} else {
|
||||
return parentConfig.getStringList(node, def);
|
||||
res = parentConfig.getStringList(node, def);
|
||||
}
|
||||
|
||||
if (res == null || res.size() == 0) {
|
||||
parentConfig.setProperty(node, new ArrayList<String>());
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user