[MySQL API/LIBRARY] MySQL in a Simple way | 100% FREE 1.0.1

Using MySQL in an simple Method

  1. CrAfTsArMy
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    • 1.14
    • 1.15
    • 1.16
    • 1.17
    Contributors:
    CrAfTs_ArMy
    Languages Supported:
    This Plugin / Library dosen't need any language Supports.
    - Step one: Create a new Java Projekt.

    - Step two: Right click your project

    upload_2021-2-24_18-12-38.png

    - Step four: Select "Build Path"

    upload_2021-2-24_18-13-54.png

    - Step five: Now click on "Configure Build Path..." and then select "Java Build Path" on the left.

    upload_2021-2-24_18-15-4.png

    - Step six: Now open the "Libraries" tab

    upload_2021-2-24_18-15-51.png

    - Step seven: Press the "Add External JARs" button

    upload_2021-2-24_18-17-15.png
    \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
    upload_2021-2-24_18-17-25.png
    \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
    upload_2021-2-24_18-17-35.png

    - Step eight: Now navigate to the file "MySQLAPI {VERSION}.jar". Select it and press "Open".

    - Step nine: Now click on "Apply And Close

    upload_2021-2-24_18-22-55.png

    - Step ten: Now right click "src" and create a new class

    - Step eleven: Create a database connection.

    Without LoginListener:
    Code (Java):
    // Replace username, password, databasename, host, port
    // with your MySQL Login Data!
    MySQLObjectBuilder builder = new MySQLObjectBuilder();
    builder.setUsername("username");
    builder.setPassword("password");
    builder.setDatabasename("databasename");
    builder.setHost("host");
    builder.setPort("port");
    MySQLObject object = builder.build();
    With LoginListener:
    Code (Java):
    // Replace username, password, databasename, host, port
    // with your MySQL Login Data!
    MySQLObjectBuilder builder = new MySQLObjectBuilder();
    builder.setUsername("username");
    builder.setPassword("password");
    builder.setDatabasename("databasename");
    builder.setHost("host");
    builder.setPort("port");
    MySQLObject object = builder.build(new LoginListener() {
           
                public void loginFailed() {
                    // TODO Auto-generated method stub
               
                }
           
                public void loggedInSuccessfully(Connection arg0) {
                    // TODO Auto-generated method stub
               
                }
    });
    - Step twelve: Start the queries. You can use the following methods to create queries or perform updates

    Code (Java):
    object.createTable(updateListener, tableName, dataTypes, ifNotExists);
    object.dropTable(updateListener, tableName, ifExists);
    object.getResult(resultListener, tableName, resultValue, resultConditions);
    object.insertInto(updateListener, tableName, toInsert);
    object.update(updateListener, tableName, updateValues, updateConditions);
    object.deleteFrom(updateListener, tableName, deleteConditions);
    If you have any questions please contact CrAfTs_ArMy

    Images

    1. upload_2021-2-24_18-10-56.png