// Path: src/main/java/com/winterhavenmc/deathchest/PluginMain.java
// public final class PluginMain extends JavaPlugin {
// 
// 	public MessageBuilder<MessageId, Macro> messageBuilder;
// 	public WorldManager worldManager;
// 	public SoundConfiguration soundConfig;
// 	public ChestManager chestManager;
// 	public CommandManager commandManager;
// 	public ProtectionPluginRegistry protectionPluginRegistry;
// 
// 
// 	@Override
// 	public void onEnable() {
// 
// 		// bStats
// 		new Metrics(this, 13916);
// 
// 		// copy default config from jar if it doesn't exist
// 		saveDefaultConfig();
// 
// 		// initialize message builder
// 		messageBuilder = new MessageBuilder<>(this);
// 
// 		// instantiate sound configuration
// 		soundConfig = new YamlSoundConfiguration(this);
// 
// 		// instantiate world manager
// 		worldManager = new WorldManager(this);
// 
// 		// instantiate chest manager
// 		chestManager = new ChestManager(this);
// 
// 		// load all chests from datastore
// 		chestManager.loadChests();
// 
// 		// instantiate command manager
// 		commandManager = new CommandManager(this);
// 
// 		// initialize event listeners
// 		new PlayerEventListener(this);
// 		new BlockEventListener(this);
// 		new InventoryEventListener(this);
// 
// 		// instantiate protection plugin registry
// 		protectionPluginRegistry = new ProtectionPluginRegistry(this);
// 	}
// 
// 
// 	@Override
// 	public void onDisable() {
// 
// 		// close datastore
// 		chestManager.closeDataStore();
// 	}
// 
// }


import com.winterhavenmc.deathchest.PluginMain;
/*
 * Copyright (c) 2022 Tim Savage.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */

package com.winterhavenmc.deathchest.commands;



enum SubcommandType {

	LIST() {
		@Override
		Subcommand create(final PluginMain plugin) {
			return new ListCommand(plugin);
		}
	},

	RELOAD() {
		@Override
		Subcommand create(final PluginMain plugin) {
			return new ReloadCommand(plugin);
		}
	},

	STATUS() {
		@Override
		Subcommand create(final PluginMain plugin) {
			return new StatusCommand(plugin);
		}
	};

// Path: src/main/java/com/winterhavenmc/deathchest/PluginMain.java
// public final class PluginMain extends JavaPlugin {
// 
// 	public MessageBuilder<MessageId, Macro> messageBuilder;
// 	public WorldManager worldManager;
// 	public SoundConfiguration soundConfig;
// 	public ChestManager chestManager;
// 	public CommandManager commandManager;
// 	public ProtectionPluginRegistry protectionPluginRegistry;
// 
// 
// 	@Override
// 	public void onEnable() {
// 
// 		// bStats
// 		new Metrics(this, 13916);
// 
// 		// copy default config from jar if it doesn't exist
// 		saveDefaultConfig();
// 
// 		// initialize message builder
// 		messageBuilder = new MessageBuilder<>(this);
// 
// 		// instantiate sound configuration
// 		soundConfig = new YamlSoundConfiguration(this);
// 
// 		// instantiate world manager
// 		worldManager = new WorldManager(this);
// 
// 		// instantiate chest manager
// 		chestManager = new ChestManager(this);
// 
// 		// load all chests from datastore
// 		chestManager.loadChests();
// 
// 		// instantiate command manager
// 		commandManager = new CommandManager(this);
// 
// 		// initialize event listeners
// 		new PlayerEventListener(this);
// 		new BlockEventListener(this);
// 		new InventoryEventListener(this);
// 
// 		// instantiate protection plugin registry
// 		protectionPluginRegistry = new ProtectionPluginRegistry(this);
// 	}
// 
// 
// 	@Override
// 	public void onDisable() {
// 
// 		// close datastore
// 		chestManager.closeDataStore();
// 	}
// 
// }


// Path: src/main/java/com/winterhavenmc/deathchest/commands/SubcommandType.java
import com.winterhavenmc.deathchest.PluginMain;

/*
 * Copyright (c) 2022 Tim Savage.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */

package com.winterhavenmc.deathchest.commands;



enum SubcommandType {

	LIST() {
		@Override
		Subcommand create(final PluginMain plugin) {
			return new ListCommand(plugin);
		}
	},

	RELOAD() {
		@Override
		Subcommand create(final PluginMain plugin) {
			return new ReloadCommand(plugin);
		}
	},

	STATUS() {
		@Override
		Subcommand create(final PluginMain plugin) {
			return new StatusCommand(plugin);
		}
	};

	abstract Subcommand create(final PluginMain plugin);