mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-23 18:45:34 +01:00
Terminate all threads on disable.
This commit is contained in:
parent
915bb5e9c6
commit
5d032c7614
@ -17,6 +17,8 @@ import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.songoda.core.database.DataManagerAbstract;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -402,6 +404,8 @@ public class SongodaCore {
|
||||
if (pi != null) {
|
||||
registeredPlugins.remove(pi);
|
||||
}
|
||||
// Terminate all active threads
|
||||
DataManagerAbstract.terminateAllThreads();
|
||||
if (event.getPlugin() == piggybackedPlugin) {
|
||||
// uh-oh! Abandon ship!!
|
||||
Bukkit.getServicesManager().unregisterAll(piggybackedPlugin);
|
||||
|
Loading…
Reference in New Issue
Block a user