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

Easy Survival command.

Discussion in 'Requests' started by Jackins, Mar 9, 2017.

  1. Jackins

    Jackins Slime

    Messages:
    92
    tiny plugin that teleport you in world named "survival" just with "/survival".

    plis help :)
     
  2. McpeBooster

    McpeBooster Baby Zombie

    Messages:
    190
    GitHub:
    mcpebooster
    Here is the code you must add :D
    PHP:
    use pocketmine\command\CommandSender;
    use 
    pocketmine\command\Command;

    public function 
    onCommand(CommandSender $senderCommand $cmd$label, array $args) {
      if (
    $cmd->getName() == "survival") {
        
    $level $this->getServer()->getLevelByName("survival");
                            
    $spawn $level->getSafeSpawn();
                          
    $sender->teleport($spawn00);
      }
    }
     
  3. Jackins

    Jackins Slime

    Messages:
    92
    thNks :D
     
  4. McpeBooster

    McpeBooster Baby Zombie

    Messages:
    190
    GitHub:
    mcpebooster
    You must of course add the class and namespace
     
  5. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    this is the request section. he is asking for a plugin, not just code
     
    Muqsit likes this.
  6. Jackins

    Jackins Slime

    Messages:
    92
    yes and... i don't know how create it... i'm noob :0
     
  7. AtomicGT200

    AtomicGT200 Creeper

    Messages:
    3
    GitHub:
    xcodemcpe
    An easier way is to use EssentialsPE from GitHub, you can do /gmc for creative, /creative, /gms for survival, /survival, and if those arnt good enough just change the command from /creative or /gmc to /c
     
  8. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    He's asking for a plugin that teleports you to the world, not to change gamemodes :p
    You can do that with EssentialsPE or SimpleWarp though, using the warp features.
     
    Muqsit, AtomicGT200 and Jackins like this.
  9. Jackins

    Jackins Slime

    Messages:
    92
    Yl
    You do not understand me.

    /survival
    For teleport in survival world. But ... Solved with modified warp.
     
    HimbeersaftLP and Sandertv like this.
  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.