Solved Constantly updating GUI

Discussion in 'Plugin Development' started by DoggyCode™, Jan 6, 2017.

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

    DoggyCode™

    What would be the best solution of creating a constantly updating GUI?

    I was thinking about creating a object extending BukkitRunnable, which would contains variables for each item spot, then updating these variables. Then initializing this object when the server starts.

    Each item would have a changing displayname to display time, etc.. and there would also be moving items.
     
  2. Offline

    I Al Istannen

    @DoggyCode™
    Yes, you would need to make a BukkitRunnable, to make it dynamic. Then maybe create a Map<Integer, Map<Integer, ItemStack>> (or make an object for that).

    The first Integer is the keyframe, the second a map of itemstacks that changed (slot->ItemStack).

    Then just check if a key exists for the current tick in the runnable and apply all changes from the map under that key.
     
  3. Offline

    DoggyCode™

    Yeah I'm just creating my own object for it . Cheers


    Sent from my iPhone using Tapatalk
     
  4. Offline

    ZP18

    @DoggyCode please mark this thread as solved if your issue has been solved
     
Thread Status:
Not open for further replies.

Share This Page