From 6db380e22df34f06ef397eda8335a47aafea7aee Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Wed, 11 Oct 2017 08:51:48 +0200 Subject: [PATCH] PlayerBucketEmptyEvent modifies the relative face of clicked block --- src/com/massivecraft/factions/engine/EnginePermBuild.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/massivecraft/factions/engine/EnginePermBuild.java b/src/com/massivecraft/factions/engine/EnginePermBuild.java index 973763a4..25cf1f4a 100644 --- a/src/com/massivecraft/factions/engine/EnginePermBuild.java +++ b/src/com/massivecraft/factions/engine/EnginePermBuild.java @@ -168,8 +168,9 @@ public class EnginePermBuild extends Engine // For some reason onPlayerInteract() sometimes misses bucket events depending on distance // (something like 2-3 blocks away isn't detected), but these separate bucket events below always fire without fail + @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) - public void useItem(PlayerBucketEmptyEvent event) { useItem(event.getPlayer(), event.getBlockClicked(), event.getBucket(), event); } + public void useItem(PlayerBucketEmptyEvent event) { useItem(event.getPlayer(), event.getBlockClicked().getRelative(event.getBlockFace()), event.getBucket(), event); } @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void useItem(PlayerBucketFillEvent event) { useItem(event.getPlayer(), event.getBlockClicked(), event.getBucket(), event); }