From e81839557568b8a868c3e195c618d4c6f58d945e Mon Sep 17 00:00:00 2001 From: ljacqu Date: Wed, 20 Apr 2016 21:39:13 +0200 Subject: [PATCH] #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 --- src/main/java/fr/xephi/authme/AuthMe.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index bcb45b098..77dd4f2d6 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -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);