Solved Remove Handler for only a single Event

Discussion in 'Plugin Development' started by LRK, Apr 4, 2018.

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

    LRK

    Hey Guys,

    I'm currently working on my new plugin and I ran into a problem:

    I want to remove a handler for only a single event. I know how to remove a handler permanently.
    So when the event is called a second time the handler should handle the event again.
    Also I need to remove the handler from inside the event.

    Every help would be nice!
     
  2. Offline

    timtower Administrator Administrator Moderator

    @LRK Add a boolean in the handler to tell it to be active or not.
     
  3. Offline

    LRK

    @timtower Thanks for your response, but I want this to work even if the plugins are not mine.
    Do you have another suggestion?
     
  4. Offline

    timtower Administrator Administrator Moderator

    @LRK Not sure if you can disable certain events.
    Why do you want it anyways?
     
  5. Offline

    LRK

    I want to have a plugin which allows you to split one main server into other smaller "Servers" (Worlds) and the plugins for the smaller Servers which are defined in a config only should receive events in their world
     
  6. Offline

    timtower Administrator Administrator Moderator

    @LRK So you want to recreate per world plugins?
     
  7. Offline

    LRK

    @timtower good to know that a plugin like this already exists :)
    Thank you! I will look up how PerWorldPlugins solved this issue :p
     
Thread Status:
Not open for further replies.

Share This Page