Don't open wizard spell menu if they right clicked a chest
This commit is contained in:
parent
b00deb683e
commit
da81d131a7
@ -179,12 +179,6 @@ public class CompassAddon extends MiniPlugin
|
||||
event.getDrops().remove(item);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void InventoryClick(InventoryClickEvent event)
|
||||
{
|
||||
//UtilInv.DisallowMovementOf(event, "Target Compass", Material.COMPASS, (byte)0, true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void SpectatorTeleport(PlayerInteractEvent event)
|
||||
{
|
||||
|
@ -6,7 +6,9 @@ import nautilus.game.arcade.game.Game.GameState;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
@ -35,7 +37,10 @@ public class WizardSpellMenu extends MiniPlugin
|
||||
{
|
||||
|
||||
Player p = event.getPlayer();
|
||||
if (event.getAction().name().contains("RIGHT") && p.getInventory().getHeldItemSlot() < 5)
|
||||
|
||||
if (event.getAction().name().contains("RIGHT")
|
||||
&& p.getInventory().getHeldItemSlot() < 5
|
||||
&& (event.getAction() != Action.RIGHT_CLICK_BLOCK || event.getClickedBlock().getState() instanceof InventoryHolder))
|
||||
{
|
||||
|
||||
_wizardShop.attemptShopOpen(p);
|
||||
|
Loading…
Reference in New Issue
Block a user