Added compatibility for our hook handler.

incremented the version
This commit is contained in:
Brianna O'Keefe 2018-05-18 13:02:28 -04:00
parent 8a1be3b1e4
commit 37daf5ad7c
2 changed files with 7 additions and 2 deletions

View File

@ -23,9 +23,14 @@ public class InteractListeners implements Listener {
@EventHandler
public void onBlockInteract(PlayerInteractEvent e) {
try {
if (e.getClickedBlock() != null && e.getClickedBlock().getType() != Material.valueOf(instance.getConfig().getString("Main.Farm Block Material")))
if (e.getClickedBlock() == null || e.getClickedBlock().getType() != Material.valueOf(instance.getConfig().getString("Main.Farm Block Material")))
return;
if (!instance.hooks.canBuild(e.getPlayer(), e.getClickedBlock().getLocation())) {
e.setCancelled(true);
return;
}
if (e.getAction() != Action.RIGHT_CLICK_BLOCK) return;
Location location = e.getClickedBlock().getLocation();

View File

@ -1,7 +1,7 @@
name: EpicFarming
description: EpicFarming
main: com.songoda.epicfarming.EpicFarming
version: 1.3
version: 1.3.1
depend: [Arconix]
author: Songoda
commands: