JewellsCP 1.4.5

SQL DataBases API

  1. joshy23
    Native Minecraft Version:
    1.16
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    • 1.14
    • 1.15
    • 1.16
    Source Code:
    https://github.com/joshy56/JewellsCP
    Contributors:
    joshy56
    Languages Supported:
    Spanish
    ¬°Hey there!
    This API provide a set of methods, some of them are:
    - The possibility of create a set of connections to a database.
    - Manage these connections.
    - Make queries.
    - Query data of other plugins and listen this queries.

    Create a set of connections for you plugin and make a query using it:
    Code (Java):

    public class YourPluginMainClass extends JavaPlugin {

    public void onEnable() {
    //PluginConnection(plugin, databaseEngine, host, port, databaseName, username, password);
    PluginConnection connection = new PluginConnection(this, Engine.MYSQL, "localhost", 3306, "anotherDB", "joshy", "12345");

    //query(SQLInstruction, values[]);
    ResultSet resultSet = connection.query("insert into MyGuests (name, surname, email) values (?, ?, ?)", new Object[]{"will", "smith", "[email protected]"});
    }
    Obtain a PluginConnection of a plugin using the PluginConnectionManager:
    Code (Java):
     PluginConnectionManager.getInstance().getConnections().getKey(JavaPlugin plugin);
    Repository:
    Code (Text):

    <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
    </repository>
     
    Artifact:
    Code (Text):

    <dependency>
           <groupId>com.github.joshy56</groupId>
           <artifactId>JewellsCP</artifactId>
           <version>1.4.5</version>
    </dependency>