Add SaveCommand
This commit is contained in:
parent
4ca81e4504
commit
607fcb9b8d
|
@ -0,0 +1,26 @@
|
|||
package me.rigamortis.seppuku.impl.command;
|
||||
|
||||
import me.rigamortis.seppuku.Seppuku;
|
||||
import me.rigamortis.seppuku.api.command.Command;
|
||||
|
||||
/**
|
||||
* @author noil
|
||||
*/
|
||||
public final class SaveCommand extends Command {
|
||||
|
||||
public SaveCommand() {
|
||||
super("Save", new String[]{"SaveAll"}, "Saves all client settings to disk.", "Save");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exec(String input) {
|
||||
if (!this.clamp(input, 1, 1)) {
|
||||
this.printUsage();
|
||||
return;
|
||||
}
|
||||
|
||||
Seppuku.INSTANCE.getConfigManager().saveAll();
|
||||
Seppuku.INSTANCE.logChat("Saved");
|
||||
}
|
||||
}
|
||||
|
|
@ -79,6 +79,7 @@ public final class CommandManager {
|
|||
this.commandList.add(new NukerFilterCommand());
|
||||
this.commandList.add(new ExportCommand());
|
||||
this.commandList.add(new LoadCommand());
|
||||
this.commandList.add(new SaveCommand());
|
||||
|
||||
//create commands for every value within every module
|
||||
loadValueCommands();
|
||||
|
|
Loading…
Reference in New Issue