Random shaking on teleport

Discussion in 'Spigot Plugin Development' started by NickDEV, Jul 21, 2017.

  1. Hello guys,

    Sometimes when the player gets teleported he gets randomly shaken.

    This occurs about once in 10 tries. How would I get rid of the shaking?

    MC version: 1.12
    Plugins: 4 custom plugins, worldguard & worldedit

    Thanks for helping,
    NickDEV
     
    • Like Like x 1
    • Funny Funny x 1
  2. The code would be helpful.....
     
  3. @TheBlackTeddy What do you want me to send? The plugins installed run on more than 10k lines of code. The problem just occurs on teleport and I'm wondering how would I fix it.

    I teleport players using
    player.teleport(location);
     
    • Like Like x 1
    • Agree Agree x 1
  4. Firestar311

    Supporter

    I don’t think there is a way to fix it, it might be a Vanilla thing with how teleporting is handled in Multiplayer
     
  5. Well obviously something causes it... Vanilla 1.12 has no issues with teleporting...
     
  6. It looks like they're getting teleported multiple times, is that what happens in the code, or is there 2 plugins handling the teleports? Try and target it down to a plugin by removing half, seeing if it still occurs etc.
     
    • Agree Agree x 1
  7. I highly doubt there's something wrong with my plugins. I think there could be a chunk or a packet problem.
     
    • Like Like x 1
    • Agree Agree x 1
  8. Let me give you some advice when it comes down to problems like this. Don't think or as you say it: "I highly doubt it" but know it and proof it. As a DEV (NickDEV) you should have already experienced this.
     
  9. The easy way to check is remove all your plugins and see if it still happens.
     
  10. Tested it without plugins, same effect.
     
    • Like Like x 2
  11. Does this happen only when teleporting to a specific place/in a specific world? Have you tried a different world? Are you running the latest version of spigot/?

    Edit: In your video you get teleported after clicking the block in a GUI, do you have access to that code? If not which plugin handles it?
    Edit: Does it only happen with that teleport, or does it happen with something like /tp 1000 100 1000
     
  12. @v_M_v I generated a new world and it didn't fix the problem. I'm gonna try to build a new spigot version with BuildTools now.

    EDIT: I was already running the latest version of spigot.
     
    #12 NickDEV, Jul 21, 2017
    Last edited: Jul 21, 2017
    • Like Like x 1
    • Agree Agree x 1
  13. @NickDEV from where and to where do you teleport? Might try teleporting somewhere high in a chunk first, so they can load, and then teleport them down.
     
    • Like Like x 1
    • Agree Agree x 1
  14. Then it's probably a chunk load causing it :p.