I was wondering how I can get a world even if the player isn't in it, and then telelport them to specific coordinates inside that world I know how to teleport them, but if they aren't in the world I want, then they will just end up in the middle of no where P.S.(No need for config, because this is a private plugin for a server ) Code:java public boolean onCommand(CommandSender sender, Command cmd, String CommandLabel, String args[]){ Player player = (Player) sender; if(CommandLabel.equalsIgnoreCase("hub")){ player.teleport(new Location(player.getWorld(),-208.39880,108,98.90151)); player.sendMessage(ChatColor.GREEN + "[" + ChatColor.BLUE + ChatColor.BOLD + "CrafterScape" + ChatColor.GREEN + "]" + ChatColor.BLUE + " Welcome to the Hub!"); } return true; } }
You can get a world by it's name like so: Code:java Bukkit.getWorld("SomeRandomWorld") EDIT: Ninja'd.. J: