TPPOS not working correctly with blockset #227


Open
  • WhiteWarlokk created this issue Sep 9, 2020

    I targeted a stone pressure plate and used the mycmd-blockset command to create  a command on that block.  Went to my resource world and did the same thing on 4 pressure plates there.  My blockdatabase.yml file looks like this:

     

    block:
    world:
    x137y67z-213:
    launchby: player
    command:
    - /tppos -166 70 104 0 0 resource_world
    resource_world:
    x-168y71z104:
    launchby: player
    command:
    - /tppos 123 64 -196 180 0 world
    x-168y71z103:
    launchby: player
    command:
    - /tppos 123 64 -196 180 0 world
    x-169y71z103:
    launchby: player
    command:
    - /tppos 123 64 -196 180 0 world
    x-169y71z104:
    launchby: player


    command:
    - /tppos 123 64 -196 180 0 world

     

     

    When I'm in creative mode, this works flawlessly.  I am teleported to the correct location in the target world.  However, when I'm in survival mode, the teleport still happens, but it doesn't send me to the coordinates in the /tppos command.  It does send me to the correct world but, instead of using the coordinates in the command, it uses the coordinates where I'm standing and teleports me to those same coordinates in the target world.  So, in the listed file, it uses the coordinates in the x-... line instead of the ones in the /tppos lines.  

     

    If I enter the same /tppos commands directly in the chat window rather than just stepping on the pressure plate, it works perfectly.  So it seems to be an issue with mycommand - not /tppos.

     

  • WhiteWarlokk posted a comment Sep 11, 2020

    Ok.  I've done some more research and this really isn't a problem with MyCommand.  Although, it would be nice if MyCommand had a way to help.

     

    I've discovered that, because I'm adding the command to a pressure plate and the command is a teleport  (happens with pwarp too), the console is throwing a "[Username] moved  wrongly" error and I believe that Spigot's built-in anti-cheat logic is teleporting me back to the starting location.  However, because it's already moved me to a different world before that happens, the teleport "back" is really going to the corresponding coordinates in the target world rather than in the one I left from.  Commands on items that don't require movement - such as buttons or levers - don't cause this problem.  Only pressure plates because you're moving when walk onto them.

     

    I've also discovered that it only seems to be horizontal movement that matters.  If I walk up to the pressure plate and jump on it - so that I'm falling on it from above - the teleport works perfectly (presumably because the downward motion is stopped as soon as the pressure plate is activated.)  I have to be in survival mode and walking or running onto the pressure plate for the issue to happen - but that's what any player would be doing 95+% of the time.  I'm thinking I need a way to freeze the player in place - stop their movement - before teleporting in order for it to be successful.

     

    Would love it if MyCommand had a way to do that (optional of course) before executing the command.  I've tried specifying delays in the config.yml file for MyCommand, but it doesn't seem to honor them.

     

     


To post a comment, please login or register a new account.