mirror of
https://github.com/DanilaFe/abacus
synced 2026-01-26 08:35:20 +00:00
Write disabled / enabled plugins to the configuration.
This commit is contained in:
@@ -6,7 +6,6 @@ import com.moandjiezana.toml.TomlWriter;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -100,29 +99,4 @@ public class Configuration {
|
||||
return disabledPlugins;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the given plugin to the disabled plugins list.
|
||||
* @param pluginClass the plugin to disable.
|
||||
*/
|
||||
public void disablePlugin(String pluginClass){
|
||||
disabledPlugins.add(pluginClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the given plugin from the disabled plugins list.
|
||||
* @param pluginClass the plugin to enable.
|
||||
*/
|
||||
public void enablePlugin(String pluginClass){
|
||||
disabledPlugins.remove(pluginClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the disabled plugins to be as specified.
|
||||
* @param newDisabled the new list of disabled plugins.
|
||||
*/
|
||||
public void setDisabledPlugins(Collection<String> newDisabled){
|
||||
disabledPlugins.clear();
|
||||
disabledPlugins.addAll(newDisabled);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user