siege weapon interaction fix

This commit is contained in:
Ben 2016-04-03 14:08:40 +01:00
parent 66a18dcc87
commit f4d4b5c5df

View File

@ -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)
{