EbeanServer(mysql and sqlite)

Discussion in 'Plugin Development' started by kamcio96, Jul 16, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    kamcio96

    How use mysql and sqlite with EbeanServer? I found this but it doesn't work :/
     
  2. Offline

    geNAZt

    Well you must tell Bukkit that you need the Ebean Database.

    Add database: true into your plugin.yml and Bukkit will make a Database Connection for you. But this Connection must use the Connection Parameters out of the bukkit.yml (Every Plugin uses the same)
     
  3. Offline

    kamcio96

    I use:
    Code:java
    1. EbeanServer s = plugin.getDatabase();
    2. String q = "CREATE TABLE IF NOT EXISTS `" + table + "` (`id` INTEGER PRIMARY KEY NOT NULL, `player` VARCHAR(255) NOT NULL, `points` INTEGER(255) NOT NULL, `kills` INTEGER(255) NOT NULL, `deaths` INTEGER(255) NOT NULL);";
    3. s.execute(s.createSqlUpdate(q));

    But it doesn't create table :/
     
Thread Status:
Not open for further replies.

Share This Page