Solved Runnable and Ram Memory

Discussion in 'Plugin Development' started by Niko_Ox, Sep 9, 2018.

Thread Status:
Not open for further replies.
  1. Hi bukkit users, I’m try to create a plugin that regenerates the blocks that a player breaks after some minutes. I think this method might stress the server beacuse it starts a new runnable for every single block destroyed, so I’d like to know if exists a mehod more efficiency.
    I thought to save Block and CurrentTime inside a HashMap and start single ruunable that checks
    The time for every variables of HashMap.
    Is this a good way? Is there another efficiency way?
     
  2. Offline

    Zombie_Striker

    @Niko_Ox
    Since BukkitRunnables simply tick down until they are called, runnables are the best way of storing when blocks need to be regenerated .
     
  3. Are you sure? I can break 1000 blocks and start 1000 runnable for every block
     
  4. Offline

    Zombie_Striker

  5. Offline

    MrGeneralQ

    Of zombie say's then believe me, it's correct

    Verstuurd vanaf mijn ONEPLUS A3003 met Tapatalk
     
  6. Mmh thanks for help, I'll use this method
     
Thread Status:
Not open for further replies.

Share This Page