statusorbs: Remove migrate code (#1237)

This commit is contained in:
Owain van Brakel
2019-08-02 22:00:36 +02:00
committed by Kyleeld
parent a62c485570
commit 2057fdfd41

View File

@@ -87,9 +87,6 @@ public class StatusOrbsPlugin extends Plugin
@Inject
private ClientThread clientThread;
@Inject
private ConfigManager configManager;
@Inject
private StatusOrbsConfig config;
@@ -454,39 +451,6 @@ public class StatusOrbsPlugin extends Plugin
client.getSpriteOverrides().remove(SpriteID.MINIMAP_ORB_HITPOINTS_ICON);
}
/**
* Migrates configs from runenergy and regenmeter to this plugin and deletes the old config values.
* This method should be removed after a reasonable amount of time.
*/
@Deprecated
private void migrateConfigs()
{
migrateConfig("regenmeter", "showHitpoints");
migrateConfig("regenmeter", "showSpecial");
migrateConfig("regenmeter", "showWhenNoChange");
migrateConfig("regenmeter", "notifyBeforeHpRegenDuration");
migrateConfig("runenergy", "replaceOrbText");
}
/**
* Wrapper for migrating individual config options
* This method should be removed after a reasonable amount of time.
*
* @param group old group name
* @param key key name to migrate
*/
@Deprecated
private void migrateConfig(String group, String key)
{
String value = configManager.getConfiguration(group, key);
if (value != null)
{
configManager.setConfiguration("statusorbs", key, value);
configManager.unsetConfiguration(group, key);
}
}
private void updateConfig()
{
this.dynamicHpHeart = config.dynamicHpHeart();