Solved SurvivalGames Plugin onspawn-move

Discussion in 'Plugin Development' started by Luc2012, May 22, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    Luc2012

    Hey,
    after hours of trying to solve my problem, i decided to ask on this forum.
    I am programming a SuvivalGames Plugin, and I want Players to stay on the Block, when they
    get Teleported on their start areas. I tryed it with many methods, but I always had the Problem, that Pitch and Yaw didnt let the players head move around. I just want them to stand on the block and they should be able to look around.
    Can anyone help me, by posting some methods, how I fix the problem?

    I am glad to hearing from you soon :)

    Luc2012
     
  2. Offline

    shades161

    check if their x y or z coord changes in the from and to locations in onPlayerMoveEvent. If they did, teleport them back to the from location, just ignore the pitch and yaw floats. This way you arent cancelling the event and are allowing the players to move their heads without moving their position.
     
  3. Offline

    Luc2012

    Thank you so much shades161!!! :)
     
  4. Offline

    Zombie_Striker

    @Luc2012
    Mark this thread as solved if your problem has been solved.
     
Thread Status:
Not open for further replies.

Share This Page