Search in sources :

Example 1 with CaveVeinManager

use of cavern.config.manager.CaveVeinManager in project Cavern2 by kegare.

the class CaveniaVeinsEntry method setToDefault.

@Override
public void setToDefault() {
    CaveVeinManager manager = CaveniaConfig.veinManager;
    try {
        FileUtils.forceDelete(new File(manager.config.toString()));
    } catch (IOException e) {
        e.printStackTrace();
        return;
    }
    manager.getCaveVeins().clear();
    manager.config = null;
    CaveniaConfig.syncVeinsConfig();
    if (childScreen != null && childScreen instanceof GuiVeinsEditor) {
        ((GuiVeinsEditor) childScreen).refreshVeins(manager.getCaveVeins());
    }
}
Also used : IOException(java.io.IOException) File(java.io.File) GuiVeinsEditor(cavern.client.gui.GuiVeinsEditor) CaveVeinManager(cavern.config.manager.CaveVeinManager)

Example 2 with CaveVeinManager

use of cavern.config.manager.CaveVeinManager in project Cavern2 by kegare.

the class CavernVeinsEntry method setToDefault.

@Override
public void setToDefault() {
    CaveVeinManager manager = CavernConfig.veinManager;
    try {
        FileUtils.forceDelete(new File(manager.config.toString()));
    } catch (IOException e) {
        e.printStackTrace();
        return;
    }
    manager.getCaveVeins().clear();
    manager.config = null;
    CavernConfig.syncVeinsConfig();
    if (childScreen != null && childScreen instanceof GuiVeinsEditor) {
        ((GuiVeinsEditor) childScreen).refreshVeins(manager.getCaveVeins());
    }
}
Also used : IOException(java.io.IOException) File(java.io.File) GuiVeinsEditor(cavern.client.gui.GuiVeinsEditor) CaveVeinManager(cavern.config.manager.CaveVeinManager)

Example 3 with CaveVeinManager

use of cavern.config.manager.CaveVeinManager in project Cavern2 by kegare.

the class HugeCavernVeinsEntry method setToDefault.

@Override
public void setToDefault() {
    CaveVeinManager manager = HugeCavernConfig.veinManager;
    try {
        FileUtils.forceDelete(new File(manager.config.toString()));
    } catch (IOException e) {
        e.printStackTrace();
        return;
    }
    manager.getCaveVeins().clear();
    manager.config = null;
    HugeCavernConfig.syncVeinsConfig();
    if (childScreen != null && childScreen instanceof GuiVeinsEditor) {
        ((GuiVeinsEditor) childScreen).refreshVeins(manager.getCaveVeins());
    }
}
Also used : IOException(java.io.IOException) File(java.io.File) GuiVeinsEditor(cavern.client.gui.GuiVeinsEditor) CaveVeinManager(cavern.config.manager.CaveVeinManager)

Example 4 with CaveVeinManager

use of cavern.config.manager.CaveVeinManager in project Cavern2 by kegare.

the class AquaCavernVeinsEntry method setToDefault.

@Override
public void setToDefault() {
    CaveVeinManager manager = AquaCavernConfig.veinManager;
    try {
        FileUtils.forceDelete(new File(manager.config.toString()));
    } catch (IOException e) {
        e.printStackTrace();
        return;
    }
    manager.getCaveVeins().clear();
    manager.config = null;
    AquaCavernConfig.syncVeinsConfig();
    if (childScreen != null && childScreen instanceof GuiVeinsEditor) {
        ((GuiVeinsEditor) childScreen).refreshVeins(manager.getCaveVeins());
    }
}
Also used : IOException(java.io.IOException) File(java.io.File) GuiVeinsEditor(cavern.client.gui.GuiVeinsEditor) CaveVeinManager(cavern.config.manager.CaveVeinManager)

Example 5 with CaveVeinManager

use of cavern.config.manager.CaveVeinManager in project Cavern2 by kegare.

the class CavelandVeinsEntry method setToDefault.

@Override
public void setToDefault() {
    CaveVeinManager manager = CavelandConfig.veinManager;
    try {
        FileUtils.forceDelete(new File(manager.config.toString()));
    } catch (IOException e) {
        e.printStackTrace();
        return;
    }
    manager.getCaveVeins().clear();
    manager.config = null;
    CavelandConfig.syncVeinsConfig();
    if (childScreen != null && childScreen instanceof GuiVeinsEditor) {
        ((GuiVeinsEditor) childScreen).refreshVeins(manager.getCaveVeins());
    }
}
Also used : IOException(java.io.IOException) File(java.io.File) GuiVeinsEditor(cavern.client.gui.GuiVeinsEditor) CaveVeinManager(cavern.config.manager.CaveVeinManager)

Aggregations

GuiVeinsEditor (cavern.client.gui.GuiVeinsEditor)5 CaveVeinManager (cavern.config.manager.CaveVeinManager)5 File (java.io.File)5 IOException (java.io.IOException)5