mirror of
https://github.com/songoda/EpicFarming.git
synced 2024-11-27 21:15:28 +01:00
Added compatibility for our hook handler.
incremented the version
This commit is contained in:
parent
8a1be3b1e4
commit
37daf5ad7c
@ -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();
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user