Збірка усіх плаґінів для WhoMine розроблених [MinersStudios](https://minersstudios.github.io).
/**
 * MSItem: A Minecraft plugin with custom items for WhoMine.
 */
package ua.com.minersstudios.whomine.item;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import lombok.*;
import org.bukkit.plugin.java.JavaPlugin;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class MSItem extends JavaPlugin
{
	/**
	 * @return a single instance of the class
	 */
	@Getter
	private static MSItem instance = new MSItem();

	/**
	 * Ensure that required plugins are installed on a server, if not - disable itself.
	 */
	@Override
	public void onEnable()
	{
		List<String> expected_plugins_names = new ArrayList<>(Arrays.asList(
			"msCore"
		));

		for (String p : expected_plugins_names)
		{
			if (getServer().getPluginManager().getPlugin(p) == null)
			{
				getLogger().log(Level.SEVERE, "Required dependencies unsatisfied.");
				getServer().getPluginManager().disablePlugin(instance);
				break;
			}
		}
	}
}