[Ruse] Command to Search Google, YouTube and More!

Hey guys.

Here is a snippet to search popular sites using a command :slight_smile: It’ll open the result in the users browser.

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 want to use my ‘openURL’ method, check out my previous tutorial!

the end film GIF by Denyse