diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index 181e0da34..4fc05f9c6 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -100,7 +100,6 @@ public class AuthMe extends JavaPlugin { // Plugin instance private static AuthMe plugin; - private NewAPI api; private Management management; private CommandHandler commandHandler; private PermissionsManager permsMan; @@ -300,9 +299,9 @@ public class AuthMe extends JavaPlugin { passwordSecurity = initializer.get(PasswordSecurity.class); spawnLoader = initializer.get(SpawnLoader.class); commandHandler = initializer.get(CommandHandler.class); - api = initializer.get(NewAPI.class); management = initializer.get(Management.class); geoLiteApi = initializer.get(GeoLiteAPI.class); + initializer.get(NewAPI.class); initializer.get(API.class); } diff --git a/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java b/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java index 2d05d5ce6..7d4aa7746 100644 --- a/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java +++ b/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java @@ -3,7 +3,6 @@ package fr.xephi.authme.hooks; import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteStreams; -import fr.xephi.authme.AuthMe; import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.cache.SessionManager; import fr.xephi.authme.cache.auth.PlayerAuth; @@ -32,9 +31,6 @@ public class BungeeCordMessage implements PluginMessageListener { @Inject private SessionManager sessionManager; - - @Inject - private AuthMe plugin; @Inject private NewSetting settings; diff --git a/src/main/java/fr/xephi/authme/listener/AuthMeServerListener.java b/src/main/java/fr/xephi/authme/listener/AuthMeServerListener.java index a851b5e98..79c1c3bef 100644 --- a/src/main/java/fr/xephi/authme/listener/AuthMeServerListener.java +++ b/src/main/java/fr/xephi/authme/listener/AuthMeServerListener.java @@ -1,6 +1,5 @@ package fr.xephi.authme.listener; -import fr.xephi.authme.AuthMe; import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.hooks.PluginHooks; import fr.xephi.authme.listener.protocollib.ProtocolLibService; @@ -24,8 +23,6 @@ import javax.inject.Inject; */ public class AuthMeServerListener implements Listener { - @Inject - private AuthMe plugin; @Inject private Messages messages; @Inject diff --git a/src/main/java/fr/xephi/authme/listener/protocollib/AuthMeInventoryPacketAdapter.java b/src/main/java/fr/xephi/authme/listener/protocollib/AuthMeInventoryPacketAdapter.java index 980f3ccb8..64ad7cf3d 100644 --- a/src/main/java/fr/xephi/authme/listener/protocollib/AuthMeInventoryPacketAdapter.java +++ b/src/main/java/fr/xephi/authme/listener/protocollib/AuthMeInventoryPacketAdapter.java @@ -25,12 +25,9 @@ import com.comphenix.protocol.events.PacketEvent; import fr.xephi.authme.AuthMe; import fr.xephi.authme.cache.auth.PlayerCache; import fr.xephi.authme.settings.Settings; -import org.apache.commons.lang.reflect.MethodUtils; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.PlayerInventory; - import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import java.util.logging.Level; @@ -44,10 +41,6 @@ public class AuthMeInventoryPacketAdapter extends PacketAdapter { private static final int ARMOR_SIZE = 4; private static final int MAIN_SIZE = 27; private static final int HOTBAR_SIZE = 9; - private static final int OFF_HAND_POSITION = 45; - - private final boolean offHandSupported = MethodUtils - .getAccessibleMethod(PlayerInventory.class, "getItemInOffHand", new Class[]{}) != null; public AuthMeInventoryPacketAdapter(AuthMe plugin) { super(plugin, PacketType.Play.Server.SET_SLOT, PacketType.Play.Server.WINDOW_ITEMS); diff --git a/src/main/java/fr/xephi/authme/permission/handlers/PermissionHandlerException.java b/src/main/java/fr/xephi/authme/permission/handlers/PermissionHandlerException.java index 41b916332..3037c4dd1 100644 --- a/src/main/java/fr/xephi/authme/permission/handlers/PermissionHandlerException.java +++ b/src/main/java/fr/xephi/authme/permission/handlers/PermissionHandlerException.java @@ -3,6 +3,7 @@ package fr.xephi.authme.permission.handlers; /** * Exception during the instantiation of a {@link PermissionHandler}. */ +@SuppressWarnings("serial") public class PermissionHandlerException extends Exception { public PermissionHandlerException(String message) {