title: bukkit - Waiting?
body: <p>Recently I started developing a Bukkit Plugin and I need help with sleeping/waiting in my code. I'm kinda new to java so if you could explain it, I would appreciate. Here is my code:</p>
  
  <pre><code>@EventHandler
  public void onTnt(PlayerInteractEntityEvent e) {
      Player clicker = e.getPlayer();
      Player rightclick = (Player) e.getRightClicked();
      rightclick.sendMessage(ChatColor.GRAY + "~" + ChatColor.DARK_PURPLE + "AN INSTAKILLER HAS YOU AS A TARGET! SNEAK NOW!");
      rightclick.sendMessage(ChatColor.GRAY + "~" + ChatColor.DARK_RED + "AN INSTAKILLER HAS YOU AS A TARGET! SNEAK NOW!");
      rightclick.sendMessage(ChatColor.GRAY + "~" + ChatColor.GOLD + "AN INSTAKILLER HAS YOU AS A TARGET! SNEAK NOW!");
      /* Then wait 3 sec. I've tried Thread.Sleep, wait() and sleep(), no sucess*/
  
      if (!(rightclick.isSneaking()))  {
          rightclick.sendMessage(ChatColor.GRAY + "~" + ChatColor.GOLD + "Bye bye.");
          rightclick.setHealth(0);
  
      }
  
  }
  </code></pre>