Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. public void(de.mrpyro13.mp.main main, Player target) {
  2.  
  3. main.jailed.put(target.getName(), new BukkitRunnable() {
  4.  
  5. @Override
  6. public void run() {
  7.  
  8. int time = main.data_cfg.getInt("McPOL.jail." + target.getName());
  9. time = time-20;
  10.  
  11. if (time <= 0) {
  12. main.data_cfg.set("McPOL.jail." + target.getName(), null);
  13. Bukkit.broadcastMessage(main.prefix + " " + "§e" + target.getName() + " §6ist wieder auf freiem Fuss!");
  14. main.jailed.get(target.getName()).cancel();
  15.  
  16. String world = main.data_cfg.getString("McPOL.locations.release.world");
  17. double x = main.data_cfg.getDouble("McPOL.locations.release.x");
  18. double y = main.data_cfg.getDouble("McPOL.locations.release.y");
  19. double z = main.data_cfg.getDouble("McPOL.locations.release.z");
  20. double yaw = main.data_cfg.getDouble("McPOL.locations.release.yaw");
  21. double pitch = main.data_cfg.getDouble("McPOL.locations.release.pitch");
  22.  
  23. Location loc = new Location(Bukkit.getWorld(world), x, y, z);
  24. loc.setYaw((float) yaw);
  25. loc.setPitch((float) pitch);
  26.  
  27. target.teleport(loc);
  28.  
  29. } else {
  30. main.data_cfg.set("McPOL.jail." + target.getName(), time);
  31. }
  32.  
  33. main.saveData();
  34.  
  35. }
  36. });
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement