#667 /authme switchantibot throws NullPointerException

- Antibot was not provided to CommandService (from where it's retrieved in the SwitchAntiBot command) because it was initialized afterwards
This commit is contained in:
ljacqu 2016-04-20 21:39:13 +02:00
parent 37fb29f8b9
commit e818395575

View File

@ -258,17 +258,13 @@ public class AuthMe extends JavaPlugin {
// Initialize spawn loader
spawnLoader = new SpawnLoader(getDataFolder(), newSettings, pluginHooks);
// Set up the permissions manager and command handler
bukkitService = new BukkitService(this);
permsMan = initializePermissionsManager();
antiBot = new AntiBot(newSettings, messages, permsMan, bukkitService);
ValidationService validationService = new ValidationService(newSettings, database, permsMan);
commandHandler = initializeCommandHandler(permsMan, messages, passwordSecurity, newSettings,
pluginHooks, spawnLoader, antiBot, validationService, bukkitService);
// AntiBot delay
antiBot = new AntiBot(newSettings, messages, permsMan, bukkitService);
// Set up Metrics
MetricsStarter.setupMetrics(plugin, newSettings);