package musician101.minetanks;

import java.io.File;

import musician101.minetanks.battlefield.BattleFieldStorage;
import musician101.minetanks.commands.MTCommands;
import musician101.minetanks.listeners.FieldListener;
import musician101.minetanks.menu.Menus;

import org.bukkit.plugin.java.JavaPlugin;

public class MineTanks extends JavaPlugin
{
	public BattleFieldStorage fieldStorage;
	public String prefix;
	
	@Override
	public void onEnable()
	{
		prefix = "[" + getDescription().getPrefix() + "]";
		new File(getDataFolder() + File.separator + "battlefields").mkdirs();
		new File(getDataFolder() + File.separator + "inventorystorage").mkdirs();
		
		
		fieldStorage = new BattleFieldStorage(this);
		fieldStorage.loadFromFiles();
		
		getServer().getPluginManager().registerEvents(new FieldListener(this), this);
		
		getCommand("minetanks").setExecutor(new MTCommands(this));
		
		Menus.init(this);
		
		getLogger().info("Movin' on out. Shuck 'em up!");
	}
	
	@Override
	public void onDisable()
	{
		fieldStorage.saveToFiles();
		getLogger().info("Pack it up, boys. We're heading home.");
	}
	//TODO need method setting up scoreboards
	//TODO need to prevent menu from opening if player is assigned
	//TODO need basic plugin info for MineTanks command
	//TODO saving player location when they join a battle
	//TODO fix armor not being returned to the player
	//TODO check if a match is in progress
}

@@ -1106,304 +1106,307 @@
 ODO 
-need method setting up scoreboards%0A%09//TODO need to prevent menu from opening if player is assigned%0A%09//TODO need basic plugin info for MineTanks command%0A%09//TODO saving player location when they join a battle%0A%09//TODO fix armor not being returned to the player%0A%09//TODO check if a match is in progress
+prevent player from picking new tank if they're ready%0A%09//TODO need method setting up scoreboards%0A%09//TODO need basic plugin info for MineTanks command%0A%09//TODO splash damage mechanic for artillery%0A%09//TODO experience, credits, %22premium%22 currencies%0A%09//TODO possible vault integration for economy support?
 %0A%7D%0A

Update TODO list