PlayerLoginEvent.disallow not working

Discussion in 'Plugin Development' started by ZanderMan9, Jan 15, 2015.

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

    ZanderMan9

    I have a piece code which will disallow a player logging in if it sees a certain pattern with their username (I'd rather not expose what I'm trying to do here, and I'm sure the rest of the code is fine.) I've had issues with PlayerLoginEvent.disallow before, but this time I can't fix it by using AsyncPlayerPreLoginEvent, because I do need the username and UUID, which cannot be gotten from the latter.
    Any solutions? Maybe kicking the player? I mean that is less efficient and a work around that I'd rather not use.
     
    Last edited: Jan 15, 2015
  2. Offline

    ColonelHedgehog

    Probably kicking them would be the best option.

    However, I'm not sure if you'd need to schedule the kick for one tick later.
     
  3. Offline

    ZanderMan9

    Are you sure there isn't a better way? There are *possible* issues with that if other plugins do things a certain way...
     
  4. Offline

    mythbusterma

  5. Offline

    ZanderMan9

    @mythbusterma That does not allow me to grab the user's UUID or username.
     
  6. Offline

    mythbusterma

    @ZanderMan9

    Maybe if you actually read instead of blindly dismissing what I say.

    [​IMG]
    [​IMG]

    Those methods look to get their name and unique ID, so please, if I'm wrong, tell me.
     
    Konato_K likes this.
  7. Offline

    ZanderMan9

    Wow... My bad. I was used to getting the player object and then using its methods.
    Thanks!
     
Thread Status:
Not open for further replies.

Share This Page