1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Any way to replace xbox-auth?

Discussion in 'General discussion' started by Taewon Kim, Dec 27, 2020.

  1. Taewon Kim

    Taewon Kim Spider

    Messages:
    9
    GitHub:
    twk1024
    Hi

    I'm making a server with Waterdog proxy.
    That's almost perfect.. but the only problem is that to use this proxy, I should disable the xbox-auth on server.properties.

    If I disable it, in the local network, any players can join my server with any nicknames.

    So, are there any suggestions to prevent that?
     
  2. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    You can turn on xbox auth on waterdog proxy.
     
  3. Taewon Kim

    Taewon Kim Spider

    Messages:
    9
    GitHub:
    twk1024
    But if I turn on it, I can't join the server.
    And also in the instruction of waterdog proxy, it says to disable it.
    Are there other settings for making that works?
     
  4. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    I mean enable it in Waterdog proxy config.yml, it must have been disabled on pocketmine server.properties file.
     
  5. Taewon Kim

    Taewon Kim Spider

    Messages:
    9
    GitHub:
    twk1024
    Oh I didn't know that I can enable it on Waterdog proxy.

    So now I'm looking for it in my config.yml, but, I don't know what is that option.
     
  6. OguzhanUmutlu

    OguzhanUmutlu Witch

    Messages:
    63
    GitHub:
    OguzhanUmutlu
    You want to enable xbox-auth but without server.properties. Am i right?
     
  7. OguzhanUmutlu

    OguzhanUmutlu Witch

    Messages:
    63
    GitHub:
    OguzhanUmutlu
    If you want to make xbox auth requirement use this:

    PHP:
    use pocketmine\event\Listener;
    use 
    pocketmine\plugin\PluginBase;
    use 
    pocketmine\event\player\PlayerLoginEvent;
    use 
    pocketmine\Player;

    class 
    Main extends PluginBase implements Listener {
        public function 
    onEnable() {
            
    $this->getServer()->getPluginManager()->registerEvents($this$this);
        }
        public function 
    loginEvent(PlayerLoginEvent $event) {
            
    $player $event->getPlayer();
            
    $xuid $player->getXuid();
            if(!
    $xuid) {
                
    $event->setKickMessage("Xbox auth enabled!");
                
    $event->setCancelled();
            }
        }
    }
     
  8. Taewon Kim

    Taewon Kim Spider

    Messages:
    9
    GitHub:
    twk1024
    Yes that's right

    And thanks for the code
    I will try it out
     
  9. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ

    Check line 5
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.