Merge pull request #161 from BentoBoxWorld/placeholder-fix
Fixes wrong placeholder value #159
This commit is contained in:
commit
388f973aee
|
@ -191,11 +191,11 @@ public class Limits extends Addon {
|
||||||
if (is == null) {
|
if (is == null) {
|
||||||
return LIMIT_NOT_SET;
|
return LIMIT_NOT_SET;
|
||||||
}
|
}
|
||||||
@Nullable IslandBlockCount ibc = getBlockLimitListener().getIsland(is.getUniqueId());
|
|
||||||
if (ibc == null) {
|
int limit = this.getBlockLimitListener().
|
||||||
return LIMIT_NOT_SET;
|
getMaterialLimits(is.getWorld(), is.getUniqueId()).
|
||||||
}
|
getOrDefault(m, -1);
|
||||||
int limit = ibc.getBlockLimit(m);
|
|
||||||
return limit == -1 ? LIMIT_NOT_SET : String.valueOf(limit);
|
return limit == -1 ? LIMIT_NOT_SET : String.valueOf(limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -431,7 +431,12 @@ public class BlockLimitsListener implements Listener {
|
||||||
}
|
}
|
||||||
// Island
|
// Island
|
||||||
if (islandCountMap.containsKey(id)) {
|
if (islandCountMap.containsKey(id)) {
|
||||||
result.putAll(islandCountMap.get(id).getBlockLimits());
|
IslandBlockCount islandBlockCount = islandCountMap.get(id);
|
||||||
|
result.putAll(islandBlockCount.getBlockLimits());
|
||||||
|
|
||||||
|
// Add offsets to the every limit.
|
||||||
|
islandBlockCount.getBlockLimitsOffset().forEach((material, offset) ->
|
||||||
|
result.put(material, result.getOrDefault(material, 0) + offset));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue