Fixes bug where limits panel doesn't show if there are entity limits but

no block limits.

https://github.com/BentoBoxWorld/addon-limits/issues/18
This commit is contained in:
tastybento 2019-05-04 21:28:40 -07:00
parent ffeb4a7386
commit f2e9f87fed

View File

@ -95,7 +95,7 @@ public class LimitPanel {
} }
IslandBlockCount ibc = addon.getBlockLimitListener().getIsland(island.getUniqueId()); IslandBlockCount ibc = addon.getBlockLimitListener().getIsland(island.getUniqueId());
Map<Material, Integer> matLimits = addon.getBlockLimitListener().getMaterialLimits(world, island.getUniqueId()); Map<Material, Integer> matLimits = addon.getBlockLimitListener().getMaterialLimits(world, island.getUniqueId());
if (matLimits.isEmpty()) { if (matLimits.isEmpty() && addon.getSettings().getLimits().isEmpty()) {
user.sendMessage("island.limits.no-limits"); user.sendMessage("island.limits.no-limits");
return; return;
} }