Fixed issue where farms removed by non players would cause errors.

This commit is contained in:
Brianna 2019-10-11 13:32:58 -04:00
parent 9262dbff5b
commit c2317a6006

View File

@ -70,7 +70,7 @@ public class BlockListeners implements Listener {
int amt = 0;
for (Farm farmm : instance.getFarmManager().getFarms().values()) {
if (!farmm.getPlacedBy().equals(e.getPlayer().getUniqueId())) continue;
if (farmm.getPlacedBy() == null || !farmm.getPlacedBy().equals(e.getPlayer().getUniqueId())) continue;
amt++;
}
int limit = maxFarms(e.getPlayer());