Closed NicoNekoDev closed 8 years ago
`public class HeavySpleefPlugin extends JavaPlugin {
private HeavySpleef heavySpleef; @Override public void onEnable() { heavySpleef = new HeavySpleef(this); Module flagModule = new FlagModule(heavySpleef); Module commandModule = new CommandModule(heavySpleef); Module persistenceModule = new PersistenceModule(heavySpleef); Module addOnModule = new AddOnModule(heavySpleef); Module legacyModule = new MigrationModule(heavySpleef); heavySpleef.registerModule(legacyModule); heavySpleef.registerModule(commandModule); heavySpleef.registerModule(flagModule); heavySpleef.registerModule(persistenceModule); heavySpleef.registerModule(addOnModule); heavySpleef.enableModules(LoadPolicy.Lifecycle.PRE_LOAD); heavySpleef.load(); heavySpleef.enableModules(LoadPolicy.Lifecycle.POST_LOAD); heavySpleef.addGamesLoadCallback(new GamesLoadCallback() { @Override public void onGamesLoaded(List<Game> games) { heavySpleef.enableModules(LoadPolicy.Lifecycle.POST_GAMES_LOAD); } }); heavySpleef.enable(); heavySpleef.enableModules(LoadPolicy.Lifecycle.POST_ENABLE); } @Override public void onDisable() { if (heavySpleef != null) { heavySpleef.disable(); } } public HeavySpleef getAPI() { <- this here return heavySpleef; }
}` not to hard to implement this... i realy need to check if a player is in a game (that running)
Thanks for pointing this out. I added a HeavySpleefPlugin#getCoreHeavySpleef() getter to the plugin class in the latest development build 307. https://ci.xaniox.de/job/HeavySpleef/
`public class HeavySpleefPlugin extends JavaPlugin {
}` not to hard to implement this... i realy need to check if a player is in a game (that running)