Skip to content

Commit

Permalink
Fixes wrong placeholder value #159
Browse files Browse the repository at this point in the history
Placeholder value did not check default and world limits. It used just island limits that are assigned via permissions.

This commit should fix it.
  • Loading branch information
BONNe committed Mar 27, 2022
1 parent baa73b7 commit b459f8b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/world/bentobox/limits/Limits.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ private String getLimit(@Nullable User user, Material m, GameModeAddon gm) {
if (is == null) {
return LIMIT_NOT_SET;
}
@Nullable IslandBlockCount ibc = getBlockLimitListener().getIsland(is.getUniqueId());
if (ibc == null) {
return LIMIT_NOT_SET;
}
int limit = ibc.getBlockLimit(m);

int limit = this.getBlockLimitListener().
getMaterialLimits(is.getWorld(), is.getUniqueId()).
getOrDefault(m, -1);

return limit == -1 ? LIMIT_NOT_SET : String.valueOf(limit);
}

Expand Down

0 comments on commit b459f8b

Please sign in to comment.