|| is undefined. why?

Discussion in 'Plugin Development' started by ThatGuyWhoDied13, Nov 9, 2013.

Thread Status:
Not open for further replies.
  1. why is it saying "error is The operator || is undefined for the argument type(s) boolean, Action" on line 8

    Code:java
    1. public void interactEvent(PlayerInteractEvent event) {
    2. Player player = event.getPlayer();
    3.  
    4. Inventory testinv = Bukkit.createInventory(null, 9, ChatColor.DARK_PURPLE + "TEST!");
    5. ItemStack testitem = new ItemStack(Material.BEACON);
    6.  
    7. if (player.getInventory().getItemInHand().getType() == Material.NETHER_STAR)
    8. if (event.getAction() == Action.RIGHT_CLICK_BLOCK || Action.RIGHT_CLICK_AIR) {
    9. player.openInventory(testinv)
    10. }
    11. }
    12.  
     
  2. Offline

    iFamasssxD

    Code:
    if (event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_AIR) { 
     
  3. Offline

    Gater12

  4. Gater12 likes this.
  5. Offline

    Gater12

    KevyPorter I would be frustrated all day because my plugin won't work because of a tiny spelling mistake :p
     
Thread Status:
Not open for further replies.

Share This Page