mirror of
https://github.com/songoda/EpicFarming.git
synced 2025-02-22 07:21:54 +01:00
Hooks are now checked on farm break.
This commit is contained in:
parent
f3e82097a8
commit
3d768a91b8
@ -161,6 +161,13 @@ public class BlockListeners implements Listener {
|
||||
Farm farm = instance.getFarmManager().removeFarm(event.getBlock().getLocation());
|
||||
|
||||
if (farm == null) return;
|
||||
|
||||
|
||||
if (!instance.canBuild(event.getPlayer(), event.getBlock().getLocation())) {
|
||||
e.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
instance.getFarmTask().getCrops(farm, false);
|
||||
|
||||
event.setCancelled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user