Is this possible? (Custom Event)

Discussion in 'Plugin Development' started by Jamscott, Jan 10, 2015.

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

    Jamscott

    Is it possible to create an event which is a RepeatingTask?

    So every 1 tick it runs the event?
     
  2. Offline

    nverdier

    @Jamscott You could just create a runnable and then call the event.
     
  3. Offline

    teej107

    @Jamscott I don't think that is entirely necessary. Just call a method instead.
     
    Konato_K likes this.
  4. Offline

    nverdier

    @teej107 Well unless he also wants it to be called when that event actually happens...
     
  5. Offline

    teej107

    @nverdier Yeah good point. I just haven't found much or any uses for custom events. If he only needs one method to be called, then just call the method. No need to call the event for just one method to be called.
     
    nverdier likes this.
  6. Offline

    1Rogue

    Creating a TickPassedEvent is shady business. If you do anything remotely intensive (takes more than 1/20th of a second to complete) you are slowing down the server.
     
  7. Offline

    Jamscott

    Sorry for making the post very plain :p
    No it will not be for one method. I'm so i can do like
    Code:
      public void CheckRank(<EventName> event)
      {
            Do stuff
    }
    So I don't need to call lots of different class

    I'm explaining what I mean really bad :p
     
  8. Offline

    teej107

  9. Offline

    Jamscott

    @teej107 I have been looking for a page like that for a while and it takes you two seconds to find one XD
     
  10. Offline

    teej107

    @Jamscott Learn to use Google efficiently!
     
  11. Offline

    SuperOriginal

    @Jamscott I searched "custom event bukkit" and that was the first link...
     
    teej107 likes this.
Thread Status:
Not open for further replies.

Share This Page