Closed xXSchrandXx closed 3 years ago
I can't even cast the Plugin to my main class...
It's properly null at the moment you want to register it. You need to set a dependency in the plugin.yml
file, that FastLogin loads after your plugin.
It is in the softdepend, it is getting set and FastLogin would even load after BCA because of the alphabetical loading of BungeeCord...
Even in my plugin it can use the method getInstance()
without getting Null...
Edit: [listFiles()](https://docs.oracle.com/javase/7/docs/api/java/io/File.html#listFiles()) does not load alphabetical.
BungeeCord will use the bungee.yml and the filter is set as well.
Edit: Decompiled jar has this bungee.yml
name: BungeeCordAuthenticatorBungee
main: de.xxschrandxx.bca.bungee.BungeeCordAuthenticatorBungee
version: 0.0.2-SNAPSHOT
author: xXSchrandXx
description: BungeeCordAuthenticatorBungee
loadbefore: [FastLogin]
Hey,
I wanted to create a hook for your plugin, but everytime I use a static variable, it is null... ( Tested static getAPI() and getInstance() ) Maybe you could help me with that.
Code for new AuthPlugin
```JAVA package com.github.games647.fastlogin.bungee.hook; import java.sql.SQLException; import com.github.games647.fastlogin.core.hooks.AuthPlugin; import org.slf4j.Logger; import de.xxschrandxx.bca.bungee.BungeeCordAuthenticatorBungee; import de.xxschrandxx.bca.bungee.api.BungeeCordAuthenticatorBungeeAPI; import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.plugin.Plugin; /** * GitHub: * https://github.com/xXSchrandXx/SpigotPlugins/tree/master/BungeeCordAuthenticator * * Project page: * * Spigot: https://www.spigotmc.org/resources/bungeecordauthenticator.87669/ */ public class BungeeCordAuthenticatorHook implements AuthPluginHere is the Link to my class with onEnable(): https://github.com/xXSchrandXx/SpigotPlugins/blob/master/BungeeCordAuthenticator/src/main/java/de/xxschrandxx/bca/bungee/BungeeCordAuthenticatorBungee.java
With best regards
xXSchrandXx