Solved (PlayerRespawnEvent).setRespawnLocation not working

Discussion in 'Plugin Development' started by Strahan, Sep 21, 2016.

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

    Strahan

    Hi. I wanted to have my plugin intercept respawns and send them to a specific point. I did:

    Code:
    public void onPlayerRespawn(PlayerRespawnEvent pre) {
      pre.setRespawnLocation(new Location(Bukkit.getServer().getWorld("imperial"), -404, 26, 655, -5.4f, 180.9f));
    }
    
    ..but at death, they aren't going where I want. I was researching and read in another thread someone suggesting perhaps another plugin is interfering. That seems likely as I have Essentials and Multiverse installed, both of which are likely to fiddle with respawns.

    Is there any way to force my plugin to have precedence over the others?
     
  2. @Strahan
    You can change the Event priority of the event. Here's how to do it. If you want your plugin to have precedence over all plugins you should use EventPriority.HIGHEST.
     
  3. Offline

    Strahan

    Thanks a lot!
     
Thread Status:
Not open for further replies.

Share This Page