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

If player join

Comments in 'Plugin Development' started by minecraft090, Jun 5, 2015.

  1. minecraft090
    Offline

    minecraft090 New Member

    Joined:
    Oct 31, 2014
    Posts:
    9
    Minecraft User:
    minecraft090
    If player join, he tp to 122, 22, 56 on level iCraftServer
  2. xpyctum
    Offline

    xpyctum Active Member Plugin Developer

    Joined:
    Jan 13, 2014
    Posts:
    292
    Plugins:
    4
    Minecraft User:
    tylerdisney
    mda, a gde she tvoy programmist?
  3. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    What is this thread about? I don't understand
    Creeperface likes this.
  4. GmWM
    Offline

    GmWM Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    181
    Plugins:
    3
    Use PlayerJoinEvent.

    PHP:
    public function onJoin(PlayerJoinEvent $event) {
            
    $player $event->getPlayer();
            
    $player->teleport(new Vector3($player->x$player->2$player->z)); //I don't know how to teleport to specific Coords.
        
    }
    A developer should correct me if I'm wrong.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    In the handler of PlayerJoinEvent, call $player->teleport() with new Position(122, 26, 56, $level) where $level is defined by $server->getLevelByName("iCraftServer")
    You aren't answering to this thread.
  6. GmWM
    Offline

    GmWM Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    181
    Plugins:
    3
    I am just trying to help.
    I also said that other developers should correct me and give the right answer.
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    He is asking how to cook pork, and you are telling him how to cook fish. Although they have something in common, do you think it helps in any ways?
  8. GmWM
    Offline

    GmWM Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    181
    Plugins:
    3
    Then you're the best and everyone should not do things that you do not agree. :|

    Edit: And you should answer his thread before me to prevent other 'incorrect help' .
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    If you don't know how to help, don't try to help by putting something not very relevant here.
    It seems that you think helping people code is just copying stuff from everywhere.
  10. GmWM
    Offline

    GmWM Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    181
    Plugins:
    3
    I didn't copied it from somewhere. This is called LEARNING.
  11. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    If you understood what you sent, to wouldn't have put that nonsense $player->x there. If you understood, you would have put $player->x there but directly the numbers.

    OK I can't blame you. Your whole concept is wrong. You don't even know which parts are learning and which parts are copying. You don't even know which part is the function and which part is the arguments. Because if you understood, you would have known what $player->x was there for.
    iksaku likes this.
  12. Sulfatezzz
    Offline

    Sulfatezzz New Member

    Joined:
    Apr 5, 2015
    Posts:
    6
    Minecraft User:
    Sulfatezzz
    Dont try to teleport a Player in the Join/prelogin event, because the MCPE-Client changed how it spawns. Its currently not possible to teleport a in these Events.

Share This Page

Advertisement