public void onEnable() { if (!this.searchCore()) { printInConsole(">>>>> FalseBookCore.jar not found! FalseBookCart.jar is being disabled!"); } else { instance = this; this.loadVersion(); server = this.getServer(); this.loadWorldSettings(); this.initCommands(); this.cartListener = new FalseBookCartVehicleListener(); this.blockListener = new FalseBookCartBlockListener(); this.playerListener = new FalseBookCartPlayerListener(); playerStationSelection = new HashMap(); this.getServer().getPluginManager().registerEvents(this.blockListener, this); this.getServer().getPluginManager().registerEvents(this.cartListener, this); this.getServer().getPluginManager().registerEvents(this.playerListener, this); Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, this.blockListener, 1L, 1L); CartHandler.loadLockedCarts(); printInConsole(pluginName + " enabled"); } }
public void onDisable() { if (this.searchCore()) { CartHandler.saveLockedCarts(); printInConsole(pluginName + " disabled"); } }