/*** MSItem: A Minecraft plugin with custom items for WhoMine.
*/packageua.com.minersstudios.whomine.item;importjava.util.ArrayList;importjava.util.Arrays;importjava.util.List;importjava.util.logging.Level;importlombok.*;importorg.bukkit.plugin.java.JavaPlugin;@NoArgsConstructor(access=AccessLevel.PRIVATE)publicfinalclassMSItemextendsJavaPlugin{/*** @return a single instance of the class
*/@GetterprivatestaticMSItem instance =newMSItem();/*** Ensure that required plugins are installed on a server, if not - disable itself.
*/@OverridepublicvoidonEnable(){List<String> expected_plugins_names =newArrayList<>(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;}}}}