CreeperSQL/DOCUMENT-MINIFIED.MD
2026-01-14 16:33:33 +01:00

1.1 KiB

CreeperSQL Lite

Standalone Java MySQL library for Minecraft plugins. No Bukkit/Spigot. Super light.


Features

  • Pure Java
  • Automatic config: plugins/MySQLConnection/config.yml
  • Standard SQL: SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, DROP TABLE
  • Must set config or read before connecting
  • Simple API

Usage

  1. Set config
    CreeperSQL mysql = new CreeperSQL();
    mysql.setConfig("host","user","pass","db");

or

mysql.readMinecraftConfig();

  1. Connect
    mysql.connect();

  2. SQL actions

  • getTables() → list of tables
  • sqlAction(sql) → returns QueryResult
  • createTable(sql)
  • dropTable(name)
  • insert(sql)
  • update(sql)
  • delete(sql)
  • close()
  1. QueryResult
  • rows → list of rows
  • affectedRows → number of rows affected
  • error → error message
  • hasError() → true if error
  • hasRows() → true if rows returned

Build

  1. Create Java project (SDK 17+)
  2. Add CreeperSQL.java
  3. Add MySQL Connector/J
  4. Build JAR → import into plugin

Notes

  • Config must be set/read before connecting
  • Async queries recommended for heavy SQL