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

Game crash on teleport to different level

Discussion in 'Help' started by minijaham, Aug 2, 2020.

  1. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Hey, I encountered some bugs while playing PMMP.
    One is that often, the whole game crashes(the client) and exits you out of Minecraft when teleporting to a different world
    Two is that you can't "craft-all." For example, when converting diamond blocks into ingots, the game doesn't let you do that by resetting crafted diamonds and returning the diamond block.

    Any ideas on how to fix these issues?
     
  2. Wanny

    Wanny Spider

    Messages:
    8
    If you want to teleport a player on world, you need to lead the level
     
  3. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    I don't really get what you mean, could you explain it in more detail?
     
  4. esh123cookie

    esh123cookie Baby Zombie

    Messages:
    104
    GitHub:
    esh123cookie
    With the crafting issue correct me if I'm wrong, but it's due to pocketmine and I doubt it can be fixed. For the teleporting issue if you could send some console loggings that would help with diagnosing the issue you are having
     
  5. GodWeedZao

    GodWeedZao Zombie Pigman

    Messages:
    401
    GitHub:
    godweedzao
    so i think you problem is in your server?, Ok
    so, mybe you should load that level befor teleport to it?
    did you use WorldLoader Plugin?
    are you sure problem is'nt for map?
    how do you create that map?
    is map for pc?
    can you give me error?
    ok, there is a lot functions to solve this,
    PHP:
    CraftingTransaction
    CraftItemEvent
    you can solve it by use these 2 functions, read about these onGithub.


    but pls explain more your first problem
     
  6. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    Submit issue here
     
  7. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    1. All of the world are already pre-loaded
    2. Crafting issue, yes I had it but it was solved
    3. There are no console logs because it was due to timeout.
     
  8. esh123cookie

    esh123cookie Baby Zombie

    Messages:
    104
    GitHub:
    esh123cookie
    what multi world plugin are you using?
     
  9. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    MultiWorld
     
  10. esh123cookie

    esh123cookie Baby Zombie

    Messages:
    104
    GitHub:
    esh123cookie
    o okay are you using any teleporter plugins? Or just normal pmmp teleporting is crashing your mc?
     
  11. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    /spawn is causing the crash.
    PHP:
    <?php

    namespace Spawn;

    use 
    pocketmine\plugin\PluginBase;
    use 
    pocketmine\command\Command;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\item\Item;
    use 
    pocketmine\Player;
    use 
    pocketmine\utils\TextFormat as C;
    use 
    pocketmine\event\player\PlayerInteractEvent;
    use 
    pocketmine\event\Listener;

    class 
    Main extends PluginBase implements Listener
    {
        
    /** @var string[] */
        
    private $config;
       
      public function 
    onEnable() : void
        
    {
            
    $this->config $this->getConfig()->getAll();
        }
      public function 
    onCommand(CommandSender $sCommand $cmd,$label, array $args):bool
      
    {
        
    $ds $this->getServer()->getDefaultLevel()->getSpawnLocation();
        
    $name $s->getName();
        switch(
    $cmd->getName())
        {
          case 
    "spawn":
            if(
    $s instanceof Player)
            {
              
    $s->sendMessage($this->config["onteleport"]);
              
    $s->teleport($ds);
              return 
    true;
            }
            else
            {
                
    $s->sendMessage($this->config["useingame"]);
                return 
    true;
            }

        }
      }
    }
     
  12. esh123cookie

    esh123cookie Baby Zombie

    Messages:
    104
    GitHub:
    esh123cookie
    could you send the console crash/error
     
  13. GodWeedZao

    GodWeedZao Zombie Pigman

    Messages:
    401
    GitHub:
    godweedzao
    :L
    my eyes are bad working, or you dont register events? XD
    PHP:
     public function onEnable() : void
        
    {
            
    $this->getServer()->getPluginManager()->registerEvents($this$this);
            
    $this->config $this->getConfig()->getAll();
        }
     
     
  14. esh123cookie

    esh123cookie Baby Zombie

    Messages:
    104
    GitHub:
    esh123cookie
    That doesn't crash the server, it just doesn't register the events
     
    Last edited: Aug 16, 2020
  15. GodWeedZao

    GodWeedZao Zombie Pigman

    Messages:
    401
    GitHub:
    godweedzao
    XD yes
     
  16. GodWeedZao

    GodWeedZao Zombie Pigman

    Messages:
    401
    GitHub:
    godweedzao
    i didnt say the crast cause is you dont register events, i said my eyes are working bad and idont see register events or he didnt registered events, READ FULL POST, THEN REPLAY:mad:
     
  17. esh123cookie

    esh123cookie Baby Zombie

    Messages:
    104
    GitHub:
    esh123cookie
    Sorta seemed like that was what you were targeting. There was nothing else to read
     
  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.