1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-30 21:07:48 +01:00

Convert Database Async

If the database is too heavy, the main thread dies and does not convert correctly.
This commit is contained in:
Bierque Jason 2021-12-16 04:23:30 +01:00 committed by GitHub
parent 93f5423300
commit f1278425bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
package com.gamingmesh.jobs.commands.list;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@ -21,7 +22,7 @@ public class convert implements Cmd {
return true;
}
Jobs.convertDatabase();
Bukkit.getScheduler().runTaskAsynchronously(plugin, Jobs::convertDatabase);
String from = "MySQL";
String to = "SQLite";