Solved SuppressWarning deprecation

Discussion in 'Plugin Development' started by Fl1pzta, Jul 7, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Fl1pzta

    I think I may be doing an Async task wrong if I'm getting this warning.

    Code:java
    1. Kingdoms.java
    2. @SuppressWarnings("deprecation")
    3. private void dailyFeeCounter(){
    4. feeTask=main.getServer().getScheduler().scheduleAsyncRepeatingTask(main, new Runnable() {
    5.  
    6. public void run() {
    7.  
    8. }
    9. }, 0L, 20L);
    10. }


    Main extends JavaPlugin.
     
  2. Offline

    MiniDigger

    the sheduleAsynTask is old. You should use the newer one runTaskTimerAsyncronly the old one will beremoved in futher updates
     
  3. Offline

    chaseoes

  4. Offline

    Fl1pzta

    Lol, yeah I saw the new scheduler page. Thanks a ton. I dig it :cool:.
     
Thread Status:
Not open for further replies.

Share This Page