示例#1
0
 /**
  * Clear all stored (check) config instances.<br>
  * This does not cleanup ConfigManager, i.e. stored yml-versions.
  */
 public static void clearConfigs() {
   // The dirty bit !
   BlockBreakConfig.clear();
   BlockInteractConfig.clear();
   BlockPlaceConfig.clear();
   ChatConfig.clear();
   CombinedConfig.clear();
   FightConfig.clear();
   InventoryConfig.clear();
   MovingConfig.clear();
 }
示例#2
0
  /**
   * Handle the '/nocheatplus reload' command.
   *
   * @param sender the sender
   * @return true, if successful
   */
  private void handleReloadCommand(final CommandSender sender) {
    sender.sendMessage(TAG + "Reloading configuration...");

    // Do the actual reload.
    ConfigManager.cleanup();
    ConfigManager.init(plugin);
    BlockBreakConfig.clear();
    BlockInteractConfig.clear();
    BlockPlaceConfig.clear();
    ChatConfig.clear();
    FightConfig.clear();
    InventoryConfig.clear();
    MovingConfig.clear();

    // Say to the other plugins that we've reloaded the configuration.
    Bukkit.getPluginManager().callEvent(new NCPReloadEvent());

    sender.sendMessage(TAG + "Configuration reloaded!");
  }