check whether chunk is being saved

Discussion in 'Plugin Development' started by Cybran, Jan 29, 2011.

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

    Cybran

    Is it possible to check whether a specified chunk is currently being saved to the files?
    --- merged: Jan 30, 2011 11:28 AM ---
    My plugin is crashing the server, because of changing BlockTypeIDs very often while the chunk is being saved (i think). How can i avoid this / react to this? Anyone an idea?
     
  2. Offline

    void420

    I assume that you're calling the bukkit API from a separate thread? If so, then that's your problem; using non-synchronized code will lead to crashes.

    If you aren't using threads then your problem is something else because the the server should not be saving a chunk while executing your event code in the main thread at the same time.
     
  3. Offline

    Cybran

    Oh, you are right, i am calling the bukkit API from a timer thread.. how can i synchronize? Is there an easy possibility for timers / in java?
     
Thread Status:
Not open for further replies.

Share This Page