Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Random r = new Random();
- final int zufall = r.nextInt(20);
- Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
- @Override
- public void run() {
- if(zufall == 1) {
- double x = cfg2.getDouble("Map1.X");
- double y = cfg2.getDouble("Map1.Y");
- double z = cfg2.getDouble("Map1.Z");
- double yaw = cfg2.getDouble("Map1.Yaw");
- double pitch = cfg2.getDouble("Map1.Pitch");
- String worldname = cfg2.getString("Map1.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- //2
- if(zufall == 2) {
- if(cfg2.getBoolean("EnableMap2") == true) {
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 2 gibt es nicht! Teleport zu Map 2!");
- }
- }
- //3
- if(zufall == 3) {
- if(cfg2.getBoolean("EnableMap3") == true) {
- double x = cfg2.getDouble("Map3.X");
- double y = cfg2.getDouble("Map3.Y");
- double z = cfg2.getDouble("Map3.Z");
- double yaw = cfg2.getDouble("Map3.Yaw");
- double pitch = cfg2.getDouble("Map3.Pitch");
- String worldname = cfg2.getString("Map3.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 3 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //4
- if(zufall == 4) {
- if(cfg2.getBoolean("EnableMap4") == true) {
- double x = cfg2.getDouble("Map4.X");
- double y = cfg2.getDouble("Map4.Y");
- double z = cfg2.getDouble("Map4.Z");
- double yaw = cfg2.getDouble("Map4.Yaw");
- double pitch = cfg2.getDouble("Map4.Pitch");
- String worldname = cfg2.getString("Map4.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 4 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //5
- if(zufall == 5) {
- if(cfg2.getBoolean("EnableMap5") == true) {
- double x = cfg2.getDouble("Map5.X");
- double y = cfg2.getDouble("Map5.Y");
- double z = cfg2.getDouble("Map5.Z");
- double yaw = cfg2.getDouble("Map5.Yaw");
- double pitch = cfg2.getDouble("Map5.Pitch");
- String worldname = cfg2.getString("Map5.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 5 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //6
- if(zufall == 6) {
- if(cfg2.getBoolean("EnableMap6") == true) {
- double x = cfg2.getDouble("Map6.X");
- double y = cfg2.getDouble("Map6.Y");
- double z = cfg2.getDouble("Map6.Z");
- double yaw = cfg2.getDouble("Map6.Yaw");
- double pitch = cfg2.getDouble("Map6.Pitch");
- String worldname = cfg2.getString("Map6.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 6 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //7
- if(zufall == 7) {
- if(cfg2.getBoolean("EnableMap7") == true) {
- double x = cfg2.getDouble("Map7.X");
- double y = cfg2.getDouble("Map7.Y");
- double z = cfg2.getDouble("Map7.Z");
- double yaw = cfg2.getDouble("Map7.Yaw");
- double pitch = cfg2.getDouble("Map7.Pitch");
- String worldname = cfg2.getString("Map7.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 7 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //8
- if(zufall == 8) {
- if(cfg2.getBoolean("EnableMap8") == true) {
- double x = cfg2.getDouble("Map8.X");
- double y = cfg2.getDouble("Map8.Y");
- double z = cfg2.getDouble("Map8.Z");
- double yaw = cfg2.getDouble("Map8.Yaw");
- double pitch = cfg2.getDouble("Map8.Pitch");
- String worldname = cfg2.getString("Map8.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 8 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //9
- if(zufall == 9) {
- if(cfg2.getBoolean("EnableMap9") == true) {
- double x = cfg2.getDouble("Map9.X");
- double y = cfg2.getDouble("Map9.Y");
- double z = cfg2.getDouble("Map9.Z");
- double yaw = cfg2.getDouble("Map9.Yaw");
- double pitch = cfg2.getDouble("Map9.Pitch");
- String worldname = cfg2.getString("Map9.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 9 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //10
- if(zufall == 10) {
- if(cfg2.getBoolean("EnableMap10") == true) {
- double x = cfg2.getDouble("Map10.X");
- double y = cfg2.getDouble("Map10.Y");
- double z = cfg2.getDouble("Map10.Z");
- double yaw = cfg2.getDouble("Map10.Yaw");
- double pitch = cfg2.getDouble("Map10.Pitch");
- String worldname = cfg2.getString("Map10.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 10 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //11
- if(zufall == 11) {
- if(cfg2.getBoolean("EnableMap11") == true) {
- double x = cfg2.getDouble("Map11.X");
- double y = cfg2.getDouble("Map11.Y");
- double z = cfg2.getDouble("Map11.Z");
- double yaw = cfg2.getDouble("Map11.Yaw");
- double pitch = cfg2.getDouble("Map11.Pitch");
- String worldname = cfg2.getString("Map11.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 11 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //12
- if(zufall == 12) {
- if(cfg2.getBoolean("EnableMap12") == true) {
- double x = cfg2.getDouble("Map12.X");
- double y = cfg2.getDouble("Map12.Y");
- double z = cfg2.getDouble("Map12.Z");
- double yaw = cfg2.getDouble("Map12.Yaw");
- double pitch = cfg2.getDouble("Map12.Pitch");
- String worldname = cfg2.getString("Map12.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 12 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //13
- if(zufall == 13) {
- if(cfg2.getBoolean("EnableMap13") == true) {
- double x = cfg2.getDouble("Map13.X");
- double y = cfg2.getDouble("Map13.Y");
- double z = cfg2.getDouble("Map13.Z");
- double yaw = cfg2.getDouble("Map13.Yaw");
- double pitch = cfg2.getDouble("Map13.Pitch");
- String worldname = cfg2.getString("Map13.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 13 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //14
- if(zufall == 14) {
- if(cfg2.getBoolean("EnableMap14") == true) {
- double x = cfg2.getDouble("Map14.X");
- double y = cfg2.getDouble("Map14.Y");
- double z = cfg2.getDouble("Map14.Z");
- double yaw = cfg2.getDouble("Map14.Yaw");
- double pitch = cfg2.getDouble("Map14.Pitch");
- String worldname = cfg2.getString("Map14.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 14 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //15
- if(zufall == 15) {
- if(cfg2.getBoolean("EnableMap15") == true) {
- double x = cfg2.getDouble("Map15.X");
- double y = cfg2.getDouble("Map15.Y");
- double z = cfg2.getDouble("Map15.Z");
- double yaw = cfg2.getDouble("Map15.Yaw");
- double pitch = cfg2.getDouble("Map15.Pitch");
- String worldname = cfg2.getString("Map15.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 15 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //16
- if(zufall == 16) {
- if(cfg2.getBoolean("EnableMap16") == true) {
- double x = cfg2.getDouble("Map16.X");
- double y = cfg2.getDouble("Map16.Y");
- double z = cfg2.getDouble("Map16.Z");
- double yaw = cfg2.getDouble("Map16.Yaw");
- double pitch = cfg2.getDouble("Map16.Pitch");
- String worldname = cfg2.getString("Map16.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 16 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //17
- if(zufall == 17) {
- if(cfg2.getBoolean("EnableMap17") == true) {
- double x = cfg2.getDouble("Map17.X");
- double y = cfg2.getDouble("Map17.Y");
- double z = cfg2.getDouble("Map17.Z");
- double yaw = cfg2.getDouble("Map17.Yaw");
- double pitch = cfg2.getDouble("Map17.Pitch");
- String worldname = cfg2.getString("Map17.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 17 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //18
- if(zufall == 18) {
- if(cfg2.getBoolean("EnableMap18") == true) {
- double x = cfg2.getDouble("Map18.X");
- double y = cfg2.getDouble("Map18.Y");
- double z = cfg2.getDouble("Map18.Z");
- double yaw = cfg2.getDouble("Map18.Yaw");
- double pitch = cfg2.getDouble("Map18.Pitch");
- String worldname = cfg2.getString("Map18.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 18 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //19
- if(zufall == 19) {
- if(cfg2.getBoolean("EnableMap19") == true) {
- double x = cfg2.getDouble("Map19.X");
- double y = cfg2.getDouble("Map19.Y");
- double z = cfg2.getDouble("Map19.Z");
- double yaw = cfg2.getDouble("Map19.Yaw");
- double pitch = cfg2.getDouble("Map19.Pitch");
- String worldname = cfg2.getString("Map19.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 19 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- //20
- if(zufall == 20) {
- if(cfg2.getBoolean("EnableMap20") == true) {
- double x = cfg2.getDouble("Map20.X");
- double y = cfg2.getDouble("Map20.Y");
- double z = cfg2.getDouble("Map20.Z");
- double yaw = cfg2.getDouble("Map20.Yaw");
- double pitch = cfg2.getDouble("Map20.Pitch");
- String worldname = cfg2.getString("Map20.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }else{
- System.err.println("FATAL: Map 20 gibt es nicht! Teleport zu Map 2!");
- double x = cfg2.getDouble("Map2.X");
- double y = cfg2.getDouble("Map2.Y");
- double z = cfg2.getDouble("Map2.Z");
- double yaw = cfg2.getDouble("Map2.Yaw");
- double pitch = cfg2.getDouble("Map2.Pitch");
- String worldname = cfg2.getString("Map2.world");
- World world = Bukkit.getWorld(worldname);
- Location loc = new Location(world, x, y, z, (float)yaw, (float)pitch);
- for(Player op : Bukkit.getOnlinePlayers()) {
- op.teleport(loc);
- }
- }
- }
- }
- }, 0L, cfg.getInt("interval")*20L);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement