Ejemplo n.º 1
0
  public void onEnable() {
    pm = this.getServer().getPluginManager();
    pdfFile = this.getDescription();

    // Load name and version from pdfFile
    name = pdfFile.getName();
    version = pdfFile.getVersion();

    // Load Configuration
    configManager.load();

    // Register our events
    pm.registerEvent(Event.Type.PLAYER_RESPAWN, playerListener, Event.Priority.Normal, this);

    pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Event.Priority.Monitor, this);
    pm.registerEvent(Event.Type.PLUGIN_DISABLE, serverListener, Event.Priority.Monitor, this);

    log(Level.INFO, "version " + version + " is enabled!");

    setupPermissions();
  }
Ejemplo n.º 2
0
  public void onDisable() {
    configManager.save();

    log(Level.INFO, "Plugin disabled!");
  }