Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. @EventHandler
  2. public void onRespawn(PlayerRespawnEvent e){
  3. final Player p = e.getPlayer();
  4.  
  5. Location random = p.getLocation();
  6. Random r = new Random();
  7. int zufall = r.nextInt(3);
  8. switch(zufall){
  9. case 0:
  10. random = new Location(p.getWorld(), 1, 1, 1);
  11. break;
  12. case 1:
  13. random = new Location(p.getWorld(), 1, 1, 1);
  14. break;
  15. case 2:
  16. random = new Location(p.getWorld(), 1, 1, 1);
  17. break;
  18. case 3:
  19. random = new Location(p.getWorld(), 1, 1, 1);
  20. break;
  21. p.teleport(random);
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement