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

teleport the player in a world where are the mostest players play?

Comments in 'Plugin Development' started by PaulchenHD, May 24, 2016.

  1. PaulchenHD
    Offline

    PaulchenHD Active Member

    Joined:
    Jan 17, 2016
    Posts:
    111
    Minecraft User:
    Paulchen_HD
    look up :3
    thanks for helping :)
  2. Svile
    Offline

    Svile Active Member

    Joined:
    Mar 30, 2015
    Posts:
    239
    Minecraft User:
    svile
    someone keep deleting your threads :D:D:D:D
  3. PaulchenHD
    Offline

    PaulchenHD Active Member

    Joined:
    Jan 17, 2016
    Posts:
    111
    Minecraft User:
    Paulchen_HD
    sry xD
  4. PaulchenHD
    Offline

    PaulchenHD Active Member

    Joined:
    Jan 17, 2016
    Posts:
    111
    Minecraft User:
    Paulchen_HD
    no one can help me ? ._.
  5. BlubberBoy333
    Offline

    BlubberBoy333 Active Member

    Joined:
    Aug 31, 2014
    Posts:
    177
    Minecraft User:
    Blubberboy333
    I'll try to make this plugin
    PaulchenHD likes this.
  6. PaulchenHD
    Offline

    PaulchenHD Active Member

    Joined:
    Jan 17, 2016
    Posts:
    111
    Minecraft User:
    Paulchen_HD
    thx but i need the code ;) i make a core :)
  7. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    PHP:

    public function teleportMostPlayers($player){
    $mostplayers 0;
    $lvl null;
    foreach(
    $this->getServer()->getLevels() as $level){

    if((
    $c count($level->getPlayers())) >= $mostplayers){
    $mostplayers $c;
    $lvl $level;
    }}

    $player->teleport(new Position(000$lvl), /* yaw *//* pitch));
  8. PaulchenHD
    Offline

    PaulchenHD Active Member

    Joined:
    Jan 17, 2016
    Posts:
    111
    Minecraft User:
    Paulchen_HD
    buggy by me & not working :/ players teleport to world1->world2->world3->world1
  9. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    Do you understand the code?
  10. PaulchenHD
    Offline

    PaulchenHD Active Member

    Joined:
    Jan 17, 2016
    Posts:
    111
    Minecraft User:
    Paulchen_HD
    yeah :3
  11. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    PHP:
    $player->teleport($lvl->getSafeSpawn());
    Survingo likes this.
  12. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    Then you should be able to fix it
  13. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    I thought getSafeSpawn only works on default level

Share This Page

Advertisement