// 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/sounds/SoundId.java
// public enum SoundId {
// 
// 	CHEST_BREAK,
// 	CHEST_DENIED_ACCESS,
// 	COMMAND_FAIL,
// 	INVENTORY_ADD_ITEM,
// 	COMMAND_INVALID,
// 	COMMAND_RELOAD_SUCCESS,
// 
// }


import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.*;
import com.winterhavenmc.deathchest.PluginMain;
import com.winterhavenmc.deathchest.sounds.SoundId;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockState;
import org.bukkit.block.Chest;
import org.bukkit.block.data.type.Sign;
import org.bukkit.block.data.type.WallSign;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
		}

		// get in game block at deathBlock location
		Block block = this.getLocation().getBlock();

		// confirm block is still death chest block
		if (plugin.chestManager.isChestBlockChest(block)) {

			// get player inventory object
			final PlayerInventory playerInventory = player.getInventory();

			// get chest object
			final Chest chest = (Chest) block.getState();

			// get Collection of ItemStack for chest inventory
			final Collection<ItemStack> chestInventory = new LinkedList<>(Arrays.asList(chest.getInventory().getContents()));

			// iterate through all inventory slots in chest inventory
			for (ItemStack itemStack : chestInventory) {

				// if inventory slot item is not null...
				if (itemStack != null) {

					// remove item from chest inventory
					chest.getInventory().removeItem(itemStack);

					// add item to player inventory
					remainingItems.addAll(playerInventory.addItem(itemStack).values());

					// play inventory add sound
// 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/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/chests/ChestBlock.java
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.*;
import com.winterhavenmc.deathchest.PluginMain;
import com.winterhavenmc.deathchest.sounds.SoundId;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockState;
import org.bukkit.block.Chest;
import org.bukkit.block.data.type.Sign;
import org.bukkit.block.data.type.WallSign;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;

		}

		// get in game block at deathBlock location
		Block block = this.getLocation().getBlock();

		// confirm block is still death chest block
		if (plugin.chestManager.isChestBlockChest(block)) {

			// get player inventory object
			final PlayerInventory playerInventory = player.getInventory();

			// get chest object
			final Chest chest = (Chest) block.getState();

			// get Collection of ItemStack for chest inventory
			final Collection<ItemStack> chestInventory = new LinkedList<>(Arrays.asList(chest.getInventory().getContents()));

			// iterate through all inventory slots in chest inventory
			for (ItemStack itemStack : chestInventory) {

				// if inventory slot item is not null...
				if (itemStack != null) {

					// remove item from chest inventory
					chest.getInventory().removeItem(itemStack);

					// add item to player inventory
					remainingItems.addAll(playerInventory.addItem(itemStack).values());

					// play inventory add sound
					plugin.soundConfig.playSound(player, SoundId.INVENTORY_ADD_ITEM);