mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-15 03:51:20 +01:00
Fix logging task (sync) not registering. Shuffle init order.
This commit is contained in:
parent
4544e1da7b
commit
3364d487cf
@ -35,6 +35,7 @@ public class BukkitLogNodeDispatcher extends AbstractLogNodeDispatcher { // TODO
|
||||
public void startTasks() {
|
||||
// TODO: This is a temporary solution. Needs on-demand scheduling [or a wrapper task].
|
||||
TickTask.addTickListener(taskPrimary);
|
||||
scheduleAsynchronous(); // Just in case.
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -732,36 +732,23 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
|
||||
TickTask.cancel();
|
||||
TickTask.reset();
|
||||
|
||||
// Start logger task(s).
|
||||
logManager.startTasks();
|
||||
|
||||
// Register some generic stuff.
|
||||
// Counters: debugging purposes, maybe integrated for statistics later.
|
||||
registerGenericInstance(new Counters());
|
||||
// Allow entries to TickTask (just in case).
|
||||
TickTask.setLocked(false);
|
||||
|
||||
// Initialize configuration, if needed.
|
||||
if (!ConfigManager.isInitialized()) {
|
||||
// Read the configuration files (should only happen on reloading).
|
||||
ConfigManager.init(this);
|
||||
}
|
||||
|
||||
final ConfigFile config = ConfigManager.getConfigFile();
|
||||
|
||||
|
||||
useSubscriptions = config.getBoolean(ConfPaths.LOGGING_BACKEND_INGAMECHAT_SUBSCRIPTIONS);
|
||||
|
||||
// Initialize MCAccess.
|
||||
initMCAccess(config);
|
||||
|
||||
// Initialize BlockProperties.
|
||||
initBlockProperties(config);
|
||||
|
||||
// Initialize data manager.
|
||||
disableListeners.add(0, dataMan);
|
||||
dataMan.onEnable();
|
||||
|
||||
// Allow entries to TickTask (just in case).
|
||||
TickTask.setLocked(false);
|
||||
|
||||
// List the events listeners and register.
|
||||
|
||||
// Start logger task(s).
|
||||
logManager.startTasks();
|
||||
|
||||
|
||||
manageListeners = config.getBoolean(ConfPaths.COMPATIBILITY_MANAGELISTENERS);
|
||||
if (manageListeners) {
|
||||
listenerManager.setRegisterDirectly(true);
|
||||
@ -773,6 +760,21 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
|
||||
listenerManager.clear();
|
||||
}
|
||||
|
||||
// Register some generic stuff.
|
||||
// Counters: debugging purposes, maybe integrated for statistics later.
|
||||
registerGenericInstance(new Counters());
|
||||
|
||||
// Initialize MCAccess.
|
||||
initMCAccess(config);
|
||||
|
||||
// Initialize BlockProperties.
|
||||
initBlockProperties(config);
|
||||
|
||||
// Initialize data manager.
|
||||
disableListeners.add(0, dataMan);
|
||||
dataMan.onEnable();
|
||||
|
||||
// Register components.
|
||||
@SetupOrder(priority = - 100)
|
||||
class ReloadHook implements INotifyReload{
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user