@Override
  public void configChanged(InstanceStorage<Object> confs) {
    // Player tracking
    if (confs.get(PluginConf.class).PlayerTracking.Enabled) {
      if (connectionListener == null) {
        registerListener(this.connectionListener = new ConnectionListener());
        getLogger().log(DEBUG, "Registered proxy player tracking listener.");
      }
    } else if (connectionListener != null) {
      unregisterListener(connectionListener);
      this.connectionListener = null;
      getLogger().log(DEBUG, "Unregistered proxy player tracking listener.");
    }

    // Plugin statistics
    if (confs.get(PluginConf.class).Stats) {
      if (metrics == null)
        try {
          this.metrics = new BungeeMetricsLite(this);
          metrics.start();
        } catch (Throwable e) {
          getLogger()
              .log(DEBUG, "Failed to enable plugin statistics: " + Helper.causedException(e));
        }
    } else if (metrics != null)
      try {
        metrics.stop();
        this.metrics = null;
      } catch (Throwable e) {
        getLogger().log(DEBUG, "Failed to disable plugin statistics: " + Helper.causedException(e));
      }
  }