Guest User

Untitled

a guest
Sep 23rd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. if(cmd.getName().equalsIgnoreCase("update")) {
  2. if(sender instanceof ConsoleCommandSender || sender.isOp()) {
  3. String command = "";
  4. for(int i = 0; i < args.length; i++) {
  5. command += " " + args[i];
  6. }
  7. update(command);
  8. }
  9. }
  10.  
  11. public void update(String update){
  12. Connection conn = null;
  13. try {
  14. conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/bluemc_rangi", "SkyBlock", "n9pUt9zACp8SW8uO");
  15. } catch (SQLException e) {
  16. System.out.println(e.getMessage());
  17. }
  18. Result r = new Result(conn);
  19. try {
  20. r.executUpdate(update);
  21. r.close();
  22. } catch (SQLException e) {
  23. System.out.println(e.getMessage());
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment