Example #1
0
  // reloads the config from disc (used if user made manual changes to the config.yml file)
  public void reloadConfig(CommandSender sender) {
    plugin.reloadConfig();
    config =
        plugin
            .getConfig(); // new assignment necessary when returned value is assigned to a variable
    // or static field(!)
    plugin.readConfigValues();

    sender.sendMessage(
        "["
            + ChatColor.GREEN
            + "Info"
            + ChatColor.WHITE
            + "] "
            + ChatColor.GREEN
            + plugin.getDescription().getName()
            + " "
            + plugin.getDescription().getVersion()
            + " reloaded!");
  }