Solved runTaskAsynchronously

Discussion in 'BungeeCord Plugin Development' started by DianoxDragon, Jun 11, 2019.

  1. Hello,

    I would like to convert a bukkit code (that matches my needs) is transposed under bungeecord code, I have already searched but I can't find exactly what I'm looking for.

    Bukkit code :
    Code (Java):
    BukkitRunnable runmysql = new BukkitRunnable() {
                    public void run() {
                        try {
                            statement = connection.createStatement();
                        } catch (ClassNotFoundException e) {
                        } catch (SQLException e) {
    it's the code for mysql in public void onEnable()

    I would like to create a new code like that in bungeecord, but I can't find it
    thanks again
  2. You can use ComplateableFuture.

    In addition I recommend a connection pool and a thread pool. Also depends on how you want to use your DB.
  3. Okay thank you for your answer

Share This Page