Whitelist Bypass

Discussion in 'Plugin Development' started by techboy291, May 16, 2014.

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

    techboy291

    Hi,

    So I help host UHCs, and I would like donators to get through even after the whitelist goes up, until the match starts. So I need a way to let certain unwhitelisted players through in a certain window of time. I'm not asking how to use a scheduler or anything, I just was wondering if temporary whitelist bypassing is possible, and if so how to do it.

    And just to clarify, I'm asking how to code this, not for help with a server.

    Thanks in advance. :)
     
  2. Offline

    caseif

    AFAIK there isn't a way to bypass a whitelist, though you could create your own by listening to PlayerJoinEvents and disallowing them if the player isn't a donator. I believe there's a way to specify the kick reason as a whitelist filter.
     
  3. Offline

    The Fancy Whale

    Not sure if they are not whitelisted if the player join event fires, but if it does fire you can just op them and a couple seconds later de-op them. Otherwise you will probably just have to make your own whitelisting system.
     
  4. Offline

    FerusGrim

    The event that handles whitelisting is PlayerLoginEvent. If you hook into that (and set the EventPriority higher than whatever kicks players), you can do a simple check to see if the player is a donator. If they are, Result = ALLOWED.

    This will allow you to use whatever whitelist you want, but allow donators in.
     
    techboy291 likes this.
  5. Offline

    techboy291

    Thank you, I was hoping it would be that simple.
     
Thread Status:
Not open for further replies.

Share This Page