Jump to content

Featured Replies

Posted
comment_63112

Hey guys, commands below.. adapt as required for other sites!

if (command[0].equals("google")) {
			String query = (wholeCommand.substring(command[0].length() + 1)).replace(" ", "%20");
			player.getPacketSender().openURL("https://www.google.com/search?q=" + query);
		}

		if (command[0].equals("youtube")) {
			String query = (wholeCommand.substring(command[0].length() + 1)).replace(" ", "%20");
			player.getPacketSender().openURL("https://www.youtube.com/results?search_query=" + query);
		}

If you'd like the same openURL method, checkout my other tut: 

Edited by Flub

  • 7 months later...

Create an account or sign in to comment