Пример #1
0
  @SuppressWarnings("unused")
  public void onEnable() {
    plugin = this;
    ConfigManager.registerConfig("config", "config.yml", this);
    ConfigManager.registerConfig("stone", "stoniarki.yml", this);
    ConfigUtils.prepareConfig();
    Logs.prepareLogFile();

    try {
      Log.info(prx + " Uruchamianie Metrics! (mcstats.org)");
      MetricsLite metrics = new MetricsLite(this);
      metrics.start();
    } catch (IOException e) {
      Log.info(prx + " Nie mozna bylo uruchomic MetricsLite!");
      Log.info(e.getStackTrace().toString());
    }

    getCommand("stoniarkibynorthpl").setExecutor(new Commands(this));
    getServer().addRecipe(CraftingRegister.recepta_na_stoniarke_by_northpl);
    BukkitTask task = new StoniarkiTask(this).runTaskTimerAsynchronously(Main.plugin, 5, 5);
    Logs.Log("Plugin Stoniarki v" + v + " by NorthPL uruchomiony! :)");
  }
Пример #2
0
 public void onDisable() {
   Logs.Log("Plugin Stoniarki v" + v + " by NorthPL wylacza sie! :(");
   ConfigManager.save("stone");
 }