Flub 1,288 Posted October 6, 2021 Report Share Posted October 6, 2021 (edited) 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 October 6, 2021 by Flub Link to comment Share on other sites More sharing options...
0117be 66 Posted June 2, 2022 Report Share Posted June 2, 2022 cool cool Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now