forked from TuxCoding/FastLogin
Void "Hook" in plugin name
This commit is contained in:
@ -94,13 +94,13 @@ public class DelayedAuthHook implements Runnable {
|
|||||||
|
|
||||||
private AuthPlugin<Player> getAuthHook() {
|
private AuthPlugin<Player> getAuthHook() {
|
||||||
try {
|
try {
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
List<Class<? extends AuthPlugin<Player>>> hooks = Arrays.asList(AuthMeHook.class,
|
List<Class<? extends AuthPlugin<Player>>> hooks = Arrays.asList(AuthMeHook.class,
|
||||||
CrazyLoginHook.class, LogItHook.class, LoginSecurityHook.class,
|
CrazyLoginHook.class, LogItHook.class, LoginSecurityHook.class,
|
||||||
SodionAuthHook.class, UltraAuthHook.class, xAuthHook.class);
|
SodionAuthHook.class, UltraAuthHook.class, xAuthHook.class);
|
||||||
|
|
||||||
for (Class<? extends AuthPlugin<Player>> clazz : hooks) {
|
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)
|
//uses only member classes which uses AuthPlugin interface (skip interfaces)
|
||||||
if (Bukkit.getPluginManager().isPluginEnabled(pluginName)) {
|
if (Bukkit.getPluginManager().isPluginEnabled(pluginName)) {
|
||||||
//check only for enabled plugins. A single plugin could be disabled by plugin managers
|
//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);
|
BungeeAuthHook.class, BungeeCordAuthenticatorBungeeHook.class, SodionAuthHook.class);
|
||||||
|
|
||||||
for (Class<? extends AuthPlugin<ProxiedPlayer>> clazz : hooks) {
|
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)
|
//uses only member classes which uses AuthPlugin interface (skip interfaces)
|
||||||
Plugin plugin = getProxy().getPluginManager().getPlugin(pluginName);
|
Plugin plugin = getProxy().getPluginManager().getPlugin(pluginName);
|
||||||
if (plugin != null) {
|
if (plugin != null) {
|
||||||
|
Reference in New Issue
Block a user