RespawnListener Broken

Discussion in 'Spigot Plugin Development' started by JoeyMotionless, May 3, 2015.

  1. I have a slight problem with the Spigot 1.8.3 PlayerRespawnEvent listener. Basically I've made it so 2 ticks after being respawned, the player is teleported to a random location from a list. I have tried other methods etc, like making the ticks larger and this does NOT work on the PlayerDeathEvent . Can't find a way to resolve this problem.

  2. @JoeyMotionless please use [ code ] blocks for errors and something like pastebin for code.
    • Create your Locations in the constructor
    • Get your random location in the method
    • Make sure you don't create the listener before onEnable is called.
    • Useful Useful x 1
  3. Code (Text):

    is much easier.
  4. This code did not work ;), only tped with p.teleport();
    Thanks so much! Been looking for a solution and this worked perfectly :D ty <3