Added a video to the "general.database.type" config option

This commit is contained in:
Florian CUNY 2019-06-18 15:26:19 +02:00
parent dec28fe161
commit f13fe4d225
2 changed files with 6 additions and 1 deletions

View File

@ -48,7 +48,7 @@ public class Settings implements ConfigObject {
@ConfigComment("MYSQL might not work with all implementations: if available, use a dedicated database type (e.g. MARIADB).")
@ConfigComment("If you use MONGODB, you must also run the BSBMongo plugin (not addon).")
@ConfigComment("See https://github.com/tastybento/bsbMongo/releases/.")
@ConfigEntry(path = "general.database.type")
@ConfigEntry(path = "general.database.type", video = "https://youtu.be/FFzCk5-y7-g")
private DatabaseType databaseType = DatabaseType.JSON;
@ConfigEntry(path = "general.database.host")

View File

@ -521,6 +521,11 @@ public class YamlDatabaseHandler<T> extends AbstractDatabaseHandler<T> {
* @since 1.3.0
*/
private void handleConfigEntryComments(@NonNull ConfigEntry configEntry, @NonNull YamlConfiguration config, @NonNull Map<String, String> yamlComments, @NonNull String parent) {
// Tell if there is a video associated to this configuration option.
if (!configEntry.video().isEmpty()) {
setComment("You can find more details in this video: " + configEntry.video(), config, yamlComments, parent);
}
// Tell when the configEntry has been added (if it's not "1.0")
if (!configEntry.since().equals("1.0")) {
setComment("Added since " + configEntry.since() + ".", config, yamlComments, parent);