mirror of
https://github.com/BentoBoxWorld/Limits.git
synced 2024-11-26 04:25:41 +01:00
Fixes reloading of data in YAML database
https://github.com/BentoBoxWorld/addon-limits/issues/6
This commit is contained in:
parent
18a3e21a5b
commit
337635d1d8
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>world.bentobox</groupId>
|
||||
<artifactId>limits</artifactId>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
<version>0.0.3-SNAPSHOT</version>
|
||||
<name>addon-limits</name>
|
||||
<description>An add-on for BentoBox that limits blocks and entities on islands.</description>
|
||||
<url>https://github.com/BentoBoxWorld/addon-level</url>
|
||||
|
@ -71,6 +71,7 @@ public class BlockLimitsListener implements Listener {
|
||||
ConfigurationSection limitConfig = addon.getConfig().getConfigurationSection("blocklimits");
|
||||
defaultLimitMap = loadLimits(limitConfig);
|
||||
}
|
||||
|
||||
// Load specific worlds
|
||||
|
||||
if (addon.getConfig().isConfigurationSection("worlds")) {
|
||||
@ -257,7 +258,11 @@ public class BlockLimitsListener implements Listener {
|
||||
}
|
||||
}
|
||||
// Check default limit map
|
||||
if (defaultLimitMap.containsKey(m) && countMap.get(id).isAtLimit(m, defaultLimitMap.get(m))) {
|
||||
if (defaultLimitMap.containsKey(m)
|
||||
&& countMap
|
||||
.get(id)
|
||||
.isAtLimit(m,
|
||||
defaultLimitMap.get(m))) {
|
||||
return defaultLimitMap.get(m);
|
||||
}
|
||||
// No limit
|
||||
|
@ -24,6 +24,9 @@ public class IslandBlockCount implements DataObject {
|
||||
@Expose
|
||||
private Map<Material, Integer> blockCount = new HashMap<>();
|
||||
|
||||
// Required for YAML database
|
||||
public IslandBlockCount() {}
|
||||
|
||||
public IslandBlockCount(String uniqueId2) {
|
||||
this.uniqueId = uniqueId2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user