Maintaining a custom config with Minority is as easy as breaking a dirt block. And it's not a joke! All we need to do is add one parameter to the @Configurable annotation.
@Configurable(file = "kitstart.yml", path = "kitstart-core", comment = "Main kitstart settings.")
public class KitStartFeature implements MinorityFeature, Listener {
@ConfigurationKey(name = "permission", value = "kitstart.default")
private String permission;
@ConfigurationKey(name = "item", type = Type.ENUM, value = "CAKE")
private Material item;
public KitStartFeature(final MinorityExtension plugin) {
plugin.getConfigurationWizard().generate(this.getClass());
this.init(this, this.getClass(), plugin);
plugin.getServer().getPluginManager().registerEvents(this, plugin);
}
@EventHandler
private void onPlayerJoin(final PlayerJoinEvent event) {
if (event.getPlayer().hasPermission(permission)) {
event.getPlayer().getInventory().addItem(new ItemStack(item));
}
}
}
Result
kitstart.yml
# This configuration file was automatically generated with Minority.
kitstart-core:
permission: kitstart.default
item: CAKE