/*** MSDecor: A Minecraft plugin with Decorations for WhoMine.
*/packageua.com.minersstudios.whomine.decor;importjava.util.ArrayList;importjava.util.Arrays;importjava.util.List;importjava.util.logging.Level;importlombok.*;importorg.bukkit.plugin.java.JavaPlugin;@NoArgsConstructor(access=AccessLevel.PRIVATE)publicfinalclassMSDecorextendsJavaPlugin{/*** @return a single instance of the class
*/@GetterprivatestaticMSDecor instance =newMSDecor();/*** Ensure that required plugins are installed on a server, if not - disable itself.
*/@OverridepublicvoidonEnable(){List<String> expected_plugins_names =newArrayList<>(Arrays.asList("msCore","CoreProtect"));for(String p : expected_plugins_names){if(getServer().getPluginManager().getPlugin(p)==null){getLogger().log(Level.SEVERE,"Required dependencies unsatisfied.");getServer().getPluginManager().disablePlugin(instance);break;}}}}