package com.censoredsoftware.demigods;

import org.bukkit.event.HandlerList;
import org.bukkit.plugin.java.JavaPlugin;

import com.censoredsoftware.demigods.data.DataManager;
import com.censoredsoftware.demigods.data.ThreadManager;
import com.censoredsoftware.demigods.player.DCharacter;
import com.censoredsoftware.demigods.player.DPlayer;
import com.censoredsoftware.demigods.util.Messages;

/**
 * Class for all plugins of demigods.
 */
public class DemigodsPlugin extends JavaPlugin
{
	/**
	 * The Bukkit enable method.
	 */
	@Override
	public void onEnable()
	{
		// Load the game engine.
		Demigods.PLUGIN = this;
		Demigods.finishLoading();

		// Handle online characters
		for(DCharacter character : DCharacter.Util.getOnlineCharacters())
			character.getMeta().cleanSkills();

		// Print success!
		Messages.info("Successfully enabled.");
	}

	/**
	 * The Bukkit disable method.
	 */
	@Override
	public void onDisable()
	{
		// Save all the data.
		DataManager.save();

		// Handle online characters
		for(DCharacter character : DCharacter.Util.getOnlineCharacters())
			DPlayer.Util.togglePrayingSilent(character.getOfflinePlayer().getPlayer(), false, false);

		// Cancel all threads, Event calls, and connections.
		ThreadManager.stopThreads();
		HandlerList.unregisterAll(this);

		Messages.info("Successfully disabled.");
	}
}

@@ -717,35 +717,23 @@
 er.Util.
-getOnlineCharacters
+loadAll
 ())%0A%09%09%09c

Clean all, not just online.