Beispiel #1
0
  public void reload() throws NPCLoadException {
    Editor.leaveAll();
    config.reload();
    despawnNPCs();
    saves.loadInto(npcRegistry);

    getServer().getPluginManager().callEvent(new CitizensReloadEvent());
  }
Beispiel #2
0
  @Override
  public void onDisable() {
    Bukkit.getPluginManager().callEvent(new CitizensDisableEvent());
    Editor.leaveAll();
    CitizensAPI.shutdown();

    tearDownScripting();
    // Don't bother with this part if MC versions are not compatible
    if (compatible) {
      saves.storeAll(npcRegistry);
      saves.saveToDiskImmediate();
      despawnNPCs();
      npcRegistry = null;
    }

    Messaging.logTr(Messages.CITIZENS_DISABLED, getDescription().getVersion());
  }