Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void teleport(Player p, List<Player> team) {
- if(team == TeamBlau) {
- File mapfile = new File("plugins/NextPlugin/Maps", "maps.yml");
- FileConfiguration cfgmap = YamlConfiguration.loadConfiguration(mapfile);
- String world = cfgmap.getString("Warps." +ms+ ".Blau.World");
- double x = cfgmap.getDouble("Warps." +ms+ ".Blau.X");
- double y = cfgmap.getDouble("Warps." +ms+ ".Blau.Y");
- double z = cfgmap.getDouble("Warps." +ms+ ".Blau.Z");
- double yaw = cfgmap.getDouble("Warps." +ms+ ".Blau.Yaw");
- double pitch = cfgmap.getDouble("Warps." +ms+ ".Blau.Pitch");
- Location loc = new Location(Bukkit.getWorld(world), x, y, z);
- loc.setYaw((float)yaw);
- loc.setPitch((float)pitch);
- p.teleport(loc);
- }
- if(team == TeamRot) {
- File mapfile = new File("plugins/NextPlugin/Maps", "maps.yml");
- FileConfiguration cfgmap = YamlConfiguration.loadConfiguration(mapfile);
- String world = cfgmap.getString("Warps." +ms+ ".Rot.World");
- double x = cfgmap.getDouble("Warps." +ms+ ".Rot.X");
- double y = cfgmap.getDouble("Warps." +ms+ ".Rot.Y");
- double z = cfgmap.getDouble("Warps." +ms+ ".Rot.Z");
- double yaw = cfgmap.getDouble("Warps." +ms+ ".Rot.Yaw");
- double pitch = cfgmap.getDouble("Warps." +ms+ ".Rot.Pitch");
- Location loc = new Location(Bukkit.getWorld(world), x, y, z);
- loc.setYaw((float)yaw);
- loc.setPitch((float)pitch);
- p.teleport(loc);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement