mirror of
https://github.com/songoda/EpicFarming.git
synced 2024-11-30 22:43:35 +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
|
@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();
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user