From f4d4b5c5dff6f64ffec96dd75a5afbd071c637bb Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 3 Apr 2016 14:08:40 +0100 Subject: [PATCH] siege weapon interaction fix --- .../game/clans/clans/siege/weapon/SiegeWeapon.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java index 771240b3f..505187567 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java @@ -23,6 +23,7 @@ import org.bukkit.event.inventory.InventoryCloseEvent; import org.bukkit.event.player.PlayerArmorStandManipulateEvent; import org.bukkit.event.player.PlayerInteractAtEntityEvent; import org.bukkit.event.player.PlayerInteractEntityEvent; +import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.world.ChunkUnloadEvent; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; @@ -744,6 +745,16 @@ public abstract class SiegeWeapon implements Listener } } + @EventHandler + public void onInteract(PlayerInteractEvent event) + { + if (event.getPlayer().equals(_rider)) + { + handleRightClick(event.getPlayer()); + event.setCancelled(true); + } + } + @EventHandler public void onInteract(PlayerInteractEntityEvent event) {