mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-29 18:27:36 +02:00
Void "Hook" in plugin name
This commit is contained in:
@ -94,13 +94,13 @@ public class DelayedAuthHook implements Runnable {
|
||||
|
||||
private AuthPlugin<Player> getAuthHook() {
|
||||
try {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Class<? extends AuthPlugin<Player>>> hooks = Arrays.asList(AuthMeHook.class,
|
||||
CrazyLoginHook.class, LogItHook.class, LoginSecurityHook.class,
|
||||
SodionAuthHook.class, UltraAuthHook.class, xAuthHook.class);
|
||||
|
||||
for (Class<? extends AuthPlugin<Player>> clazz : hooks) {
|
||||
String pluginName = clazz.getSimpleName().replace("Hook", "");
|
||||
String pluginName = clazz.getSimpleName();
|
||||
pluginName = pluginName.substring(0, pluginName.length() - 4);
|
||||
//uses only member classes which uses AuthPlugin interface (skip interfaces)
|
||||
if (Bukkit.getPluginManager().isPluginEnabled(pluginName)) {
|
||||
//check only for enabled plugins. A single plugin could be disabled by plugin managers
|
||||
|
@ -121,7 +121,8 @@ public class FastLoginBungee extends Plugin implements PlatformPlugin<CommandSen
|
||||
BungeeAuthHook.class, BungeeCordAuthenticatorBungeeHook.class, SodionAuthHook.class);
|
||||
|
||||
for (Class<? extends AuthPlugin<ProxiedPlayer>> clazz : hooks) {
|
||||
String pluginName = clazz.getSimpleName().replace("Hook", "");
|
||||
String pluginName = clazz.getSimpleName();
|
||||
pluginName = pluginName.substring(0, pluginName.length() - 4);
|
||||
//uses only member classes which uses AuthPlugin interface (skip interfaces)
|
||||
Plugin plugin = getProxy().getPluginManager().getPlugin(pluginName);
|
||||
if (plugin != null) {
|
||||
|
Reference in New Issue
Block a user