Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void MySQL() {
- try {
- String HOSTNAME = "185.62.39.10";
- String PORT = "3306";
- String DATABASE = "db_1";
- String USERNAME = "db_1";
- String PASSWORD = "785c9d21bc";
- MySQL getConnection = new MySQL(HOSTNAME, PORT, DATABASE, USERNAME, PASSWORD);
- try {
- c = getConnection.openConnection();
- } catch (Exception e) {
- Bukkit.getConsoleSender().sendMessage(
- "[MineCrave Enchants Configuration] Please input your MySQL Information in the config.yml and restart the server or plugin.");
- }
- try {
- Statement s = Main.c.createStatement();
- s.executeUpdate("create table if not exists playerdata ( "
- + " uuid VARCHAR(50), name VARCHAR(50), "
- + " tokens INT )");
- } catch (SQLException e) {
- Bukkit.getConsoleSender().sendMessage(
- " There is an error creating the table in your database. Please check your MySQL Information in the config.yml to see if it is correct.");
- }
- } catch (NullPointerException e) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement