mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-29 03:59:06 +00:00
Post shutdown fixes
This commit is contained in:
@@ -159,16 +159,30 @@ public class MultiBurst {
|
||||
|
||||
public void shutdownLater() {
|
||||
if (service != null) {
|
||||
service.submit(() -> {
|
||||
J.sleep(3000);
|
||||
try
|
||||
{
|
||||
service.submit(() -> {
|
||||
J.sleep(3000);
|
||||
Iris.debug("Shutting down MultiBurst Pool " + heartbeat.getName() + ".");
|
||||
|
||||
if (service != null) {
|
||||
service.shutdown();
|
||||
}
|
||||
});
|
||||
|
||||
heartbeat.interrupt();
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
Iris.debug("Shutting down MultiBurst Pool " + heartbeat.getName() + ".");
|
||||
|
||||
if (service != null) {
|
||||
service.shutdown();
|
||||
}
|
||||
});
|
||||
|
||||
heartbeat.interrupt();
|
||||
heartbeat.interrupt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,10 +18,16 @@
|
||||
|
||||
package com.volmit.iris.util.plugin;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
public interface IrisService extends Listener {
|
||||
void onEnable();
|
||||
|
||||
void onDisable();
|
||||
|
||||
default void postShutdown(Runnable r)
|
||||
{
|
||||
Iris.instance.postShutdown(r);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user