Solved Problem: Only listen event if the softdependend plugin is installed

Discussion in 'Plugin Development' started by FameForAim, Jan 29, 2015.

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

    FameForAim

    Hi everyone,
    i use bungeecord as softdependency because it need for a special feature bungeecorde, but it also works without it.
    So for this special feature i want the listener only to listen to this special feature event if the depended plugin is installed on the server.
    If not it just should check all other events but not the special one.

    How can i realize this?
    I tried a if statement before the Listener but it did not work

    Best regards
    FameForAim
     
  2. Offline

    TGRHavoc

    If the plugin exists and is initiated then register the event else, don't register the event.
     
    FameForAim likes this.
  3. Offline

    FameForAim

    But i register the whole listener not a single event, and there are many events in this listener.. so must i create a new listener?
     
  4. Offline

    1Rogue

    Sure, why not.
     
    FameForAim likes this.
  5. Offline

    TGRHavoc

    Yes.
     
    FameForAim likes this.
  6. Offline

    FameForAim

    ok :) thanks i will do it this way.. never tought about this :D
     
Thread Status:
Not open for further replies.

Share This Page