Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved MCPE Client ID

Comments in 'Plugin Development' started by Svile, Dec 8, 2015.

  1. Svile
    Offline

    Svile Active Member

    Joined:
    Mar 30, 2015
    Posts:
    239
    Minecraft User:
    svile
    How is MCPE client id generated ? Is safe to ban a player client ID ? How to get a player client id ?
    AndriassY likes this.
  2. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Well, it's not a good way to ban someone, as you can configure it in a config in your MCPE Folder. And it'll get removed and replaced by UUID (Player::getUniqueID()) - Later will be running over an "Account-System" by Mojang, known from the PC Version of Minecraft.
    Last edited: Dec 8, 2015
  3. Svile
    Offline

    Svile Active Member

    Joined:
    Mar 30, 2015
    Posts:
    239
    Minecraft User:
    svile
    thanks
  4. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    PHP:
    public function PreLogin(\pocketmine\event\player\PlayerPreLoginEvent $event){
    $bannedClientIds = array();//you can type the client ids here
    foreach($bannedClientIds as $ci){
    if(
    $event->getPlayer()->getClientId() == $ci){
    $event->setKickMessage("You're Banned!");
    $event->setCancelled(true);
    }
    }
    }
  5. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    array() resets at the Server restart. I recommend using MySQL, SQL or Files. And, as I said before, it's not that good to use ClientID, as it will be removed soon and is changeable.
    cake23 likes this.

Share This Page

Advertisement