mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-03 06:37:47 +01:00
Fix bow issue with offhand items with disable interaction.
This isn't actually needed, the item should be caught by the Interact event and this causes a bug where you cannot shoot bows with any single item like a tome in your offhand that has Disable interaction even if your bow doesn't. I've used MMOItems without this section of code and ender pearls etc are still cancelled just fine. This is unneeded.
This commit is contained in:
parent
2470bce7b6
commit
a7daa3091a
@ -151,20 +151,6 @@ public class DisableInteractions implements Listener {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void k(ProjectileLaunchEvent event) {
|
||||
if(!(event.getEntity().getShooter() instanceof Player))
|
||||
return;
|
||||
|
||||
Player player = (Player) event.getEntity().getShooter();
|
||||
NBTItem item = NBTItem.get(player.getInventory().getItemInMainHand());
|
||||
NBTItem item2 = NBTItem.get(player.getInventory().getItemInOffHand());
|
||||
|
||||
if(item.getBoolean("MMOITEMS_DISABLE_INTERACTION") ||
|
||||
item2.getBoolean("MMOITEMS_DISABLE_INTERACTION"))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
private int firstArrow(Player player) {
|
||||
|
||||
// check offhand first
|
||||
|
Loading…
Reference in New Issue
Block a user