SHARE
TWEET

Untitled

a guest Oct 20th, 2019 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package Listener;
  2.  
  3. import org.bukkit.entity.Player;
  4. import org.bukkit.event.EventHandler;
  5. import org.bukkit.event.Listener;
  6. import org.bukkit.event.entity.PlayerDeathEvent;
  7.  
  8. import Utils.LocationManager;
  9.  
  10. public class AutoRespawn
  11.   implements Listener
  12. {
  13.   public static final int Respawn_Time = 2;
  14.  
  15.  
  16.   @EventHandler
  17.   public void onDeath(PlayerDeathEvent e)
  18.   {
  19.     final Player p = e.getEntity();
  20.     if (p.isDead()) {
  21.         p.spigot().respawn();
  22.         LocationManager.useLocation(p, "spawn");
  23.       }
  24.   }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top