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

how to cancel "You teleported to spawn"???

Comments in 'Plugin Development' started by Xenturio, Nov 13, 2014.

  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    PlayerDeathEvent::setKeepInventory(true);
    Xenturio likes this.
  2. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    ^^" Hey Xenturio. Hatte dasselbe Problem auch gerade in meinem Minigame

    Had the same problem in my minigame too, this helped me alot! Thanks! ^^
  3. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    SetRespawnPosizion doesn't work for me because chunks don't load after that so i use setSpawn() instead
  4. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    I just can confirm, i start bugging and the world doesn't load if i use this method.
    setSpawn will work? Won't it set the spawn forever?
  5. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    yes but i didn't find another way :p but i use it in minigames so maybe here is setRespawnPosition needed
  6. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    I'll try to use setRespawnPosition, and then teleport to the same position.
  7. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    hm but i dont know why. In pocketmine source code is respawn position automatically Position object. So if setSpawn() works so setRespawnPosition() should work too :/
  8. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    Didn't work. I created a task now, which teleports the player to the world after 1 tick.
  9. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    pocketmine\event\entity\EntityTeleportEvent is called on respawn (Maby... ^_^)

Share This Page

Advertisement