Saftey and Async tasks.

Discussion in 'Plugin Development' started by acecheesecr14, Mar 8, 2014.

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

    acecheesecr14

    Is it safe to use variables that get a string from the config using bukkits api in a scheduled repeating async task?
    Code:java
    1. String name = getConfig().getString("This.String");

    Can this be used in a repeating async task?
     
  2. Offline

    amhokies

    acecheesecr14
    I think what I would do is to get that value on the main server thread, then pass it over to the async task as a parameter to a constructor.
     
  3. Offline

    acecheesecr14

    Okay, I'll be safe and go with that!
     
Thread Status:
Not open for further replies.

Share This Page