use of com.builtbroken.mc.api.process.IWorkerThread in project Engine by VoltzEngine-Project.
the class CommandThreadClear method handleConsoleCommand.
@Override
public boolean handleConsoleCommand(ICommandSender sender, String[] args) {
for (IWorkerThread thread : VoltzEngineAPI.WORKER_THREADS.values()) {
if (thread != null) {
int process = thread.containedProcesses();
thread.clearProcesses();
sender.addChatMessage(new ChatComponentText("Cleared " + process + " process from thread " + thread.toString()));
}
}
return true;
}
use of com.builtbroken.mc.api.process.IWorkerThread in project Engine by VoltzEngine-Project.
the class Engine method serverStopping.
@EventHandler
public void serverStopping(FMLServerStoppingEvent event) {
// TODO save qued objects
synchronized (VoltzEngineAPI.WORKER_THREADS) {
for (IWorkerThread thread : VoltzEngineAPI.WORKER_THREADS.values()) {
logger().info("Killing thread " + thread);
thread.kill();
}
}
}
Aggregations