// 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/messages/MessageId.java
// public enum MessageId {
// 
// 	CHEST_SUCCESS,
// 	DOUBLECHEST_PARTIAL_SUCCESS,
// 	CHEST_DENIED_DEPLOYMENT_BY_PLUGIN,
// 	CHEST_DENIED_ACCESS_BY_PLUGIN,
// 	CHEST_DENIED_BLOCK,
// 	CHEST_DENIED_PERMISSION,
// 	CHEST_DENIED_ADJACENT,
// 	CHEST_DENIED_SPAWN_RADIUS,
// 	CHEST_DENIED_WORLD_DISABLED,
// 	CHEST_DENIED_VOID,
// 	CHEST_DEPLOYED_PROTECTION_TIME,
// 	CHEST_ACCESSED_PROTECTION_TIME,
// 	INVENTORY_EMPTY,
// 	INVENTORY_FULL,
// 	NO_CHEST_IN_INVENTORY,
// 	NOT_OWNER,
// 	CHEST_EXPIRED,
// 	CREATIVE_MODE,
// 	NO_CREATIVE_ACCESS,
// 	CHEST_CURRENTLY_OPEN,
// 
// 	COMMAND_FAIL_INVALID_COMMAND,
// 	COMMAND_FAIL_ARGS_COUNT_OVER,
// 	COMMAND_FAIL_HELP_PERMISSION,
// 	COMMAND_FAIL_LIST_PERMISSION,
// 	COMMAND_FAIL_LIST_OTHER_PERMISSION,
// 	COMMAND_FAIL_RELOAD_PERMISSION,
// 	COMMAND_FAIL_STATUS_PERMISSION,
// 	COMMAND_SUCCESS_RELOAD,
// 
// 	COMMAND_HELP_INVALID,
// 	COMMAND_HELP_HELP,
// 	COMMAND_HELP_LIST,
// 	COMMAND_HELP_RELOAD,
// 	COMMAND_HELP_STATUS,
// 	COMMAND_HELP_USAGE,
// 
// 	LIST_HEADER,
// 	LIST_FOOTER,
// 	LIST_EMPTY,
// 	LIST_ITEM,
// 	LIST_ITEM_ALL,
// 	LIST_PLAYER_NOT_FOUND,
// 
// }
// 
// Path: src/main/java/com/winterhavenmc/deathchest/sounds/SoundId.java
// public enum SoundId {
// 
// 	CHEST_BREAK,
// 	CHEST_DENIED_ACCESS,
// 	COMMAND_FAIL,
// 	INVENTORY_ADD_ITEM,
// 	COMMAND_INVALID,
// 	COMMAND_RELOAD_SUCCESS,
// 
// }


import com.winterhavenmc.deathchest.PluginMain;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import com.winterhavenmc.deathchest.messages.MessageId;
import com.winterhavenmc.deathchest.sounds.SoundId;
import javax.annotation.Nonnull;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
						&& subcommand.startsWith(args[1].toLowerCase())
						&& !subcommand.equalsIgnoreCase("help")) {
					returnList.add(subcommand);
				}
			}
		}

		return returnList;
	}


	@Override
	public boolean onCommand(final CommandSender sender, final List<String> args) {

		// if command sender does not have permission to display help, output error message and return true
		if (!sender.hasPermission("deathchest.help")) {
			plugin.messageBuilder.build(sender, MessageId.COMMAND_FAIL_HELP_PERMISSION).send();
			plugin.soundConfig.playSound(sender, SoundId.COMMAND_FAIL);
			return true;
		}

		// if no arguments, display usage for all commands
		if (args.size() == 0) {
			displayUsageAll(sender);
			return true;
		}

		// get subcommand name
		String subcommandName = args.get(0);
		displayHelp(sender, subcommandName);
// 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/messages/MessageId.java
// public enum MessageId {
// 
// 	CHEST_SUCCESS,
// 	DOUBLECHEST_PARTIAL_SUCCESS,
// 	CHEST_DENIED_DEPLOYMENT_BY_PLUGIN,
// 	CHEST_DENIED_ACCESS_BY_PLUGIN,
// 	CHEST_DENIED_BLOCK,
// 	CHEST_DENIED_PERMISSION,
// 	CHEST_DENIED_ADJACENT,
// 	CHEST_DENIED_SPAWN_RADIUS,
// 	CHEST_DENIED_WORLD_DISABLED,
// 	CHEST_DENIED_VOID,
// 	CHEST_DEPLOYED_PROTECTION_TIME,
// 	CHEST_ACCESSED_PROTECTION_TIME,
// 	INVENTORY_EMPTY,
// 	INVENTORY_FULL,
// 	NO_CHEST_IN_INVENTORY,
// 	NOT_OWNER,
// 	CHEST_EXPIRED,
// 	CREATIVE_MODE,
// 	NO_CREATIVE_ACCESS,
// 	CHEST_CURRENTLY_OPEN,
// 
// 	COMMAND_FAIL_INVALID_COMMAND,
// 	COMMAND_FAIL_ARGS_COUNT_OVER,
// 	COMMAND_FAIL_HELP_PERMISSION,
// 	COMMAND_FAIL_LIST_PERMISSION,
// 	COMMAND_FAIL_LIST_OTHER_PERMISSION,
// 	COMMAND_FAIL_RELOAD_PERMISSION,
// 	COMMAND_FAIL_STATUS_PERMISSION,
// 	COMMAND_SUCCESS_RELOAD,
// 
// 	COMMAND_HELP_INVALID,
// 	COMMAND_HELP_HELP,
// 	COMMAND_HELP_LIST,
// 	COMMAND_HELP_RELOAD,
// 	COMMAND_HELP_STATUS,
// 	COMMAND_HELP_USAGE,
// 
// 	LIST_HEADER,
// 	LIST_FOOTER,
// 	LIST_EMPTY,
// 	LIST_ITEM,
// 	LIST_ITEM_ALL,
// 	LIST_PLAYER_NOT_FOUND,
// 
// }
// 
// Path: src/main/java/com/winterhavenmc/deathchest/sounds/SoundId.java
// public enum SoundId {
// 
// 	CHEST_BREAK,
// 	CHEST_DENIED_ACCESS,
// 	COMMAND_FAIL,
// 	INVENTORY_ADD_ITEM,
// 	COMMAND_INVALID,
// 	COMMAND_RELOAD_SUCCESS,
// 
// }


// Path: src/main/java/com/winterhavenmc/deathchest/commands/HelpCommand.java
import com.winterhavenmc.deathchest.PluginMain;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import com.winterhavenmc.deathchest.messages.MessageId;
import com.winterhavenmc.deathchest.sounds.SoundId;
import javax.annotation.Nonnull;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;

						&& subcommand.startsWith(args[1].toLowerCase())
						&& !subcommand.equalsIgnoreCase("help")) {
					returnList.add(subcommand);
				}
			}
		}

		return returnList;
	}


	@Override
	public boolean onCommand(final CommandSender sender, final List<String> args) {

		// if command sender does not have permission to display help, output error message and return true
		if (!sender.hasPermission("deathchest.help")) {
			plugin.messageBuilder.build(sender, MessageId.COMMAND_FAIL_HELP_PERMISSION).send();
			plugin.soundConfig.playSound(sender, SoundId.COMMAND_FAIL);
			return true;
		}

		// if no arguments, display usage for all commands
		if (args.size() == 0) {
			displayUsageAll(sender);
			return true;
		}

		// get subcommand name
		String subcommandName = args.get(0);
		displayHelp(sender, subcommandName);
		return true;