-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Adainish/1.20.1-1.4
FEAT:
- Loading branch information
Showing
12 changed files
with
74 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+56.9 MB
libs/Cobblemon-forge-1.3.2+1.19.2.jar → ...emon-forge-1.4.0b4324+1.20.1-SNAPSHOT.jar
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+106 KB
...forge-3.0.0-1.19.2-20230412.185927-14.jar → libs/gooeylibs-3.0.0-1.20.2-forge.jar
Binary file not shown.
Binary file renamed
BIN
+6.96 MB
libs/kotlinforforge-3.11.0-all.jar → libs/kotlinforforge-4.3.0-all.jar
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/main/java/io/github/adainish/cobbleclearforge/config/LanguageConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package io.github.adainish.cobbleclearforge.config; | ||
|
||
import com.google.gson.Gson; | ||
import com.google.gson.stream.JsonReader; | ||
import io.github.adainish.cobbleclearforge.CobbleClearForge; | ||
import io.github.adainish.cobbleclearforge.util.Adapters; | ||
|
||
import java.io.*; | ||
|
||
public class LanguageConfig | ||
{ | ||
public String prefix = "&c&l[&b&lCobbleClear&c&l]"; | ||
public String splitter = " » "; | ||
|
||
public static void writeConfig() | ||
{ | ||
File dir = CobbleClearForge.getConfigDir(); | ||
dir.mkdirs(); | ||
Gson gson = Adapters.PRETTY_MAIN_GSON; | ||
LanguageConfig config = new LanguageConfig(); | ||
try { | ||
File file = new File(dir, "language.json"); | ||
if (file.exists()) | ||
return; | ||
file.createNewFile(); | ||
FileWriter writer = new FileWriter(file); | ||
String json = gson.toJson(config); | ||
writer.write(json); | ||
writer.close(); | ||
} catch (IOException e) | ||
{ | ||
CobbleClearForge.getLog().warn(e); | ||
} | ||
} | ||
|
||
public static LanguageConfig getConfig() | ||
{ | ||
File dir = CobbleClearForge.getConfigDir(); | ||
dir.mkdirs(); | ||
Gson gson = Adapters.PRETTY_MAIN_GSON; | ||
File file = new File(dir, "language.json"); | ||
JsonReader reader = null; | ||
try { | ||
reader = new JsonReader(new FileReader(file)); | ||
} catch (FileNotFoundException e) { | ||
CobbleClearForge.getLog().error("Something went wrong attempting to read the Config"); | ||
return null; | ||
} | ||
|
||
return gson.fromJson(reader, LanguageConfig.class); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters