/*     */   @EventHandler
/*     */   public void onPlayerInteract(PlayerInteractEvent event)
/*     */   {
/* 185 */     if (Main.getAPI().isSpectating(event.getPlayer()))
/*     */     {
/* 187 */       if (Main.getAPI().isReadyForNextScroll(event.getPlayer()))
/*     */       {
/* 189 */         if (Main.getAPI().getSpectateMode(event.getPlayer()) == SpectateMode.SCROLL)
/*     */         {
/* 191 */           if ((event.getAction() == Action.LEFT_CLICK_AIR) || (event.getAction() == Action.LEFT_CLICK_BLOCK))
/*     */           {
/* 193 */             if (Bukkit.getServer().getOnlinePlayers().length > 2)
/*     */             {
/* 195 */               Main.getAPI().scrollLeft(event.getPlayer(), Main.getAPI().getSpectateablePlayers());
/* 196 */               Main.getAPI().disableScroll(event.getPlayer(), 5L);
/*     */             }
/*     */ 
/*     */           }
/* 200 */           else if ((event.getAction() == Action.RIGHT_CLICK_AIR) || (event.getAction() == Action.RIGHT_CLICK_BLOCK))
/*     */           {
/* 202 */             if (Bukkit.getServer().getOnlinePlayers().length > 2)
/*     */             {
/* 204 */               Main.getAPI().scrollRight(event.getPlayer(), Main.getAPI().getSpectateablePlayers());
/* 205 */               Main.getAPI().disableScroll(event.getPlayer(), 5L);
/*     */             }
/*     */ 
/*     */           }
/*     */ 
/*     */         }
/*     */ 
/*     */       }
/*     */ 
/* 215 */       event.setCancelled(true);
/* 216 */       return;
/*     */     }
/*     */   }