use of com.voxelgameslib.voxelgameslib.internal.timings.Timing in project VoxelGamesLibv2 by VoxelGamesLib.
the class VoxelGamesLib method onDisable.
@Override
public void onDisable() {
if (!enabledCleanly) {
return;
}
try {
// chat menu api
ChatMenuAPI.disable();
getServer().getPluginManager().callEvent(new VoxelGamesLibDisableEvent());
try (final Timing timing = new Timing("DisableAllHandlers")) {
configHandler.disable();
langHandler.disable();
tickHandler.disable();
chatHandler.disable();
userHandler.disable();
roleHandler.disable();
mapHandler.disable();
worldHandler.disable();
teamHandler.disable();
eloHandler.disable();
matchmakingHandler.disable();
signHandler.disable();
metricHandler.disable();
kitHandler.disable();
pointHandler.disable();
commandHandler.disable();
textureHandler.disable();
statsHandler.disable();
gameHandler.disable();
moduleHandler.disable();
eventHandler.disable();
persistenceHandler.disable();
errorHandler.disable();
loggingHandler.disable();
injector = null;
}
} catch (Exception ex) {
errorHandler.handle(ex, Severity.ERROR, true);
}
}
use of com.voxelgameslib.voxelgameslib.internal.timings.Timing in project VoxelGamesLibv2 by VoxelGamesLib.
the class VoxelGamesLibModule method getScannerWithAddons.
@Provides
@Named("IncludeAddons")
public ScanResult getScannerWithAddons(ModuleHandler moduleHandler) {
try (Timing timing = new Timing("ModuleClassPathScanning")) {
ClassGraph scanner = new ClassGraph();
scanner.addClassLoader(getClass().getClassLoader());
moduleHandler.getModuleClassLoaders().forEach(scanner::addClassLoader);
return scanner.enableAllInfo().scan();
}
}
Aggregations