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 @EventHandler
public void onBlockInteract(PlayerInteractEvent e) { public void onBlockInteract(PlayerInteractEvent e) {
try { 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; return;
if (!instance.hooks.canBuild(e.getPlayer(), e.getClickedBlock().getLocation())) {
e.setCancelled(true);
return;
}
if (e.getAction() != Action.RIGHT_CLICK_BLOCK) return; if (e.getAction() != Action.RIGHT_CLICK_BLOCK) return;
Location location = e.getClickedBlock().getLocation(); Location location = e.getClickedBlock().getLocation();

View File

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