title: Bukkit - Can't start a runTaskTimerAsynchronously();
body: <p>I'm creating a bukkit plugin, and I'm having trouble with sending a message every few minutes. It used to work, but I'm now using the bukkit 1.4.6 beta and it isn't. The previous method is deprecated, but it gave me the same error so I decided to switch to it's replacement, with no luck.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>Bukkit.getServer().getScheduler().runTaskTimerAsynchronously((Plugin) this, new Runnable() {
      public void run() {
          Bukkit.broadcastMessage(ChatColor.DARK_PURPLE + "" + ChatColor.MAGIC + "aaaaaa" + ChatColor.RESET + "    Important    " + ChatColor.DARK_PURPLE + "" + ChatColor.MAGIC + "aaaaaa" + ChatColor.RESET + ":");
          Bukkit.broadcastMessage("");
          Bukkit.broadcastMessage("  Hacks are stricly prohibited. A list of approved mods is available on our website. Use of mods not approved by the arenacraft team may lead to a permanent ban.");
      }}, 60L, 36000L);
  }
  </code></pre>
  
  <p>I'm using <a href="http://jd.bukkit.org/doxygen/df/dfa/interfaceorg_1_1bukkit_1_1scheduler_1_1BukkitScheduler.html#a08981807328a2291346884e6ab773212" rel="nofollow">this</a> for it.</p>
  
  <p>The console gives me the following:</p>
  
  <pre><code>me.silvershad0wz.arenacraft.Notices (the class this code is from) Cannot be cast to org.bukkit.plugin.Plugin.
  </code></pre>
  
  <p>Followed by many errors. It hails from this</p>
  
  <pre><code>Bukkit.getServer().getScheduler().runTaskTimerAsynchronously((Plugin) this, new Runnable() {
  </code></pre>
  
  <p>line.</p>
  
  <p>Any help is appreciated, as I have no idea what the "Cannot be cast to" error means.</p>