#293 Add comments to help file, migrate header setting, write tests
This commit is contained in:
@@ -49,6 +49,7 @@ public class SettingsMigrationService extends PlainMigrationService {
|
||||
| migrateJoinLeaveMessages(resource)
|
||||
| migrateForceSpawnSettings(resource)
|
||||
| changeBooleanSettingToLogLevelProperty(resource)
|
||||
| hasOldHelpHeaderProperty(resource)
|
||||
|| hasDeprecatedProperties(resource);
|
||||
}
|
||||
|
||||
@@ -154,6 +155,15 @@ public class SettingsMigrationService extends PlainMigrationService {
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean hasOldHelpHeaderProperty(PropertyResource resource) {
|
||||
if (resource.contains("settings.helpHeader")) {
|
||||
ConsoleLogger.warning("Help header setting is now in messages/help_xx.yml, "
|
||||
+ "please check the file to set it again");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks for an old property path and moves it to a new path if present.
|
||||
*
|
||||
|
||||
@@ -9,10 +9,6 @@ import static com.github.authme.configme.properties.PropertyInitializer.newPrope
|
||||
|
||||
public class PluginSettings implements SettingsHolder {
|
||||
|
||||
@Comment("The name shown in the help messages")
|
||||
public static final Property<String> HELP_HEADER =
|
||||
newProperty("settings.helpHeader", "AuthMeReloaded");
|
||||
|
||||
@Comment({
|
||||
"Do you want to enable the session feature?",
|
||||
"If enabled, when a player authenticates successfully,",
|
||||
|
||||
Reference in New Issue
Block a user