Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-2294

isOpen only works with the bottomblock of doors

XMLWordPrintable

      Works fine with Trapdoors and Gates. With doors it only works with the bottom block - the top half every time returns "false".

      public void onDoorInteract(PlayerInteractEvent pie) {
      
          if(!pie.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
            return;
          }
      
          MaterialData md = pie.getClickedBlock().getState().getData();
          if(md instanceof Openable){
            pie.getPlayer().sendMessage("Open: " + ((Openable) md).isOpen());
          }
      }
      

            Unassigned Unassigned
            Block-Build Block-Build
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: