BlockUpdate Line

Discussion in 'Plugin Development' started by Letscrime, May 29, 2014.

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

    Letscrime

    Hey Guys, i need your help c:
    I want to "draw" a line with block updates.
    Maybe i have to explain what i want:
    When you login, you will teleported to the spawn, and now i got a new minigame.
    So now i want to send blockupdates on the way the minigame, i mean i want to set a way to the new minigame which is changing the block of the bottom to a clay block for 2 seconds, after 2 seconds the blocks will be changed to the "real" block again, then after 10 seconds its started again with the block updates.

    But i didnt want to send ALL blockupdates at once, i want to simulate an "loading bar" if you know what i mean.

    I hope anybody can help me.
    Sorry for the bad explanation, i didnt know how to explain this sh** :c

    Cheers, Letscrime.
     
  2. Offline

    metalhedd


    Don't ever call Thread.sleep in a bukkit plugin.
     
    Skyost and Garris0n like this.
  3. Offline

    Mrawesomecookie

    Garris0n
    Even if its in another thread?

    RawCode
    Ok, deleting my bukkit account now, also deleting all of my projects, my github, my bukkitdev, and all of my kittens.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 1, 2016
  4. Offline

    Garris0n

    Sure, if you want to completely stop a thread, call Thread.sleep(). Do you want to completely stop the server's main thread for a delay?
     
  5. Offline

    NathanWolf

    Lol... Um, so... Yeah, anyway!

    I think you want a scheduled task- make a list of the blocks you want to change, in the order you want to change them. Schedule a repeating task to change one every few ticks.

    Repeat the process using stored BlockState (or something similar to store the previous blocks' states) to undo the change.

    Hope that helps!
     
  6. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    Removed a couple inappropriate posts.
     
Thread Status:
Not open for further replies.

Share This Page