Hey, I currently have the problem that the constructor of my main class is executed but the ProxyInitializaEvent isn't fired.
This is my main class:
The "Starting..." from the constructor is visible in the console, but the "Initialized!" from the ProxyInitializeEvent isn't, the "Shut down!" from the ProxyShutdownEvent isn't either. So obviously the listeners in the LoginListener class aren't respected and the 3 Managers aren't created
Velocity does print "Loading plugin MongoBan 1.0-SNAPSHOT by PC1up"
(Yes, the whole "@Plugin" part is there)
This is my main class:
Java:
private final ProxyServer server;
private final Logger logger;
private static PlayerlistManager playerManager;
private static BanManager banManager;
private static MuteManager muteManager;
public static PlayerlistManager getPlayerManager(){
return playerManager;
}
public static BanManager getBanManager() {
return banManager;
}
public static MuteManager getMuteManager() {
return muteManager;
}
@Inject
public MongoBan(ProxyServer server, Logger logger){
this.server = server;
this.logger = logger;
logger.info("Starting...");
}
@Subscribe
public void onProxyInitializiation(ProxyInitializeEvent event){
logger.info("Initialized!");
playerManager = new PlayerlistManager();
banManager = new BanManager();
muteManager = new MuteManager();
server.getEventManager().register(this, new LoginListener());
}
@Subscribe
public void onProxyShutdown(ProxyShutdownEvent event){
banManager.closeMongo();
playerManager.closeMongo();
muteManager.closeMongo();
logger.info("Shut down!");
}
The "Starting..." from the constructor is visible in the console, but the "Initialized!" from the ProxyInitializeEvent isn't, the "Shut down!" from the ProxyShutdownEvent isn't either. So obviously the listeners in the LoginListener class aren't respected and the 3 Managers aren't created
Velocity does print "Loading plugin MongoBan 1.0-SNAPSHOT by PC1up"
(Yes, the whole "@Plugin" part is there)
- Version Output
- 3.3.0-SNAPSHOT (git-b9b11665-b343)