diff --git a/pom.xml b/pom.xml index a27c574..0e64535 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,7 @@ -LOCAL - 1.22.0 + 1.23.0 BentoBoxWorld_Limits bentobox-world https://sonarcloud.io diff --git a/src/main/java/world/bentobox/limits/Limits.java b/src/main/java/world/bentobox/limits/Limits.java index ff3ffb6..84d1f85 100644 --- a/src/main/java/world/bentobox/limits/Limits.java +++ b/src/main/java/world/bentobox/limits/Limits.java @@ -210,10 +210,13 @@ private String getLimit(@Nullable User user, Material m, GameModeAddon gm) { if (is == null) { return LIMIT_NOT_SET; } - + if (user != null) { + // Check the permissions of the user and update + this.getJoinListener().checkPerms(user.getPlayer(), gm.getPermissionPrefix() + "island.limit.", + is.getUniqueId(), gm.getDescription().getName()); + } int limit = this.getBlockLimitListener(). - getMaterialLimits(is.getWorld(), is.getUniqueId()). - getOrDefault(m, -1); + getMaterialLimits(is.getWorld(), is.getUniqueId()).getOrDefault(m, -1); return limit == -1 ? LIMIT_NOT_SET : String.valueOf(limit); }