Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onRespawn(PlayerRespawnEvent e){
- final Player p = e.getPlayer();
- Location random = p.getLocation();
- Random r = new Random();
- int zufall = r.nextInt(3);
- switch(zufall){
- case 0:
- random = new Location(p.getWorld(), 1, 1, 1);
- break;
- case 1:
- random = new Location(p.getWorld(), 1, 1, 1);
- break;
- case 2:
- random = new Location(p.getWorld(), 1, 1, 1);
- break;
- case 3:
- random = new Location(p.getWorld(), 1, 1, 1);
- break;
- p.teleport(random);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement