Pooling Events

Discussion in 'Plugin Development' started by Flyverse, Sep 21, 2013.

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

    Flyverse

    Hi!

    I wanted to fire a specific event in rapid intervals. To do so without using too much performance, I had the idea to pool those events; But how are they handled? Would it work, if I do something like this?
    Code:java
    1. TheEvent e = eventPool.get(somedata1, somedata2); // Borrowing object from pool
    2. Bukkit.getPluginManager().callEvent(e); //Calling the event
    3. eventPool.free(e); //Returning object to pool
    4.  
     
  2. Offline

    leimekiller

    Can you explain a littlee bit better what you mean please?
     
Thread Status:
Not open for further replies.

Share This Page