Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class JailDelay {
- int x;
- int y;
- int z;
- int x1;
- int y1;
- int z1;
- public void wait(final String playername, final int time, final String coordsjail , final String coordsfree){
- new Thread() {
- Player p = etc.getServer().matchPlayer(playername);
- public void run() {
- try{
- String[] split = coordsjail.split(",");
- try{ x = Integer.valueOf(split[0]); y = Integer.valueOf(split[1]); z = Integer.valueOf(split[2]);}catch(NumberFormatException nfe){return;}
- p.switchWorlds(0);
- p.teleportTo(x,y,z, 0, 0);
- Thread.sleep(time);
- String[] split1 = coordsfree.split(",");
- try{ x1 = Integer.valueOf(split1[0]); y1 = Integer.valueOf(split1[1]); z1 = Integer.valueOf(split1[2]);}catch(NumberFormatException nfe){return;}
- p.switchWorlds(0);
- p.teleportTo(x,y,z, 0, 0);
- }catch(InterruptedException e) {p.sendMessage("§4o.o an error occured report it to an admin");}
- }
- }.start();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment