generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I lied with the previous version... The mod works now
- Loading branch information
Showing
20 changed files
with
112 additions
and
97 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
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
2 changes: 1 addition & 1 deletion
2
...ffle/emcutils/callbacks/ChatCallback.java → ...ydae/emcutils/callbacks/ChatCallback.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
2 changes: 1 addition & 1 deletion
2
...s/callbacks/CommandExecutionCallback.java → ...s/callbacks/CommandExecutionCallback.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
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
4 changes: 2 additions & 2 deletions
4
...waffle/emcutils/features/UsableItems.java → ...frydae/emcutils/features/UsableItems.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
8 changes: 4 additions & 4 deletions
8
...utils/features/VisitResidenceHandler.java → ...utils/features/VisitResidenceHandler.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
4 changes: 2 additions & 2 deletions
4
...ffle/emcutils/mixins/ChatScreenMixin.java → ...ydae/emcutils/mixins/ChatScreenMixin.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
6 changes: 3 additions & 3 deletions
6
...utils/mixins/ClientEntityPlayerMixin.java → ...utils/mixins/ClientEntityPlayerMixin.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
10 changes: 5 additions & 5 deletions
10
...mixins/ClientPlayNetworkHandlerMixin.java → ...mixins/ClientPlayNetworkHandlerMixin.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
4 changes: 2 additions & 2 deletions
4
...e/emcutils/mixins/ConnectScreenMixin.java → ...e/emcutils/mixins/ConnectScreenMixin.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
4 changes: 2 additions & 2 deletions
4
...e/emcutils/mixins/PlayerListHudMixin.java → ...e/emcutils/mixins/PlayerListHudMixin.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
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,52 @@ | ||
package dev.frydae.emcutils.utils; | ||
|
||
import com.google.gson.Gson; | ||
import com.google.gson.GsonBuilder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.io.FileReader; | ||
import java.io.FileWriter; | ||
import java.io.IOException; | ||
|
||
public class Config { | ||
@Getter @Setter private boolean tabListShowAllServers; | ||
@Getter @Setter private ModMenuIntegration.TabListSortType tabListSortType; | ||
@Getter @Setter private ModMenuIntegration.TabListCurrentServerPlacement tabListCurrentServerPlacement; | ||
|
||
private static volatile Config singleton; | ||
|
||
private Config() { | ||
this.tabListShowAllServers = true; | ||
this.tabListSortType = ModMenuIntegration.TabListSortType.SERVER_ASCENDING; | ||
this.tabListCurrentServerPlacement = ModMenuIntegration.TabListCurrentServerPlacement.TOP; | ||
} | ||
|
||
public static synchronized Config getInstance() { | ||
if (singleton == null) { | ||
singleton = new Config(); | ||
} | ||
|
||
return singleton; | ||
} | ||
|
||
public void load() { | ||
try (FileReader reader = new FileReader("config/emc_utils.json")) { | ||
Gson gson = new Gson(); | ||
|
||
singleton = gson.fromJson(reader, Config.class); | ||
} catch (IOException e) { | ||
Log.exception(e); | ||
} | ||
} | ||
|
||
public void save() { | ||
try (FileWriter writer = new FileWriter("config/emc_utils.json")) { | ||
Gson gson = new GsonBuilder().setPrettyPrinting().create(); | ||
|
||
gson.toJson(singleton, writer); | ||
} catch (IOException e) { | ||
Log.exception(e); | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...e/waffle/emcutils/utils/EmpireServer.java → ...v/frydae/emcutils/utils/EmpireServer.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
4 changes: 2 additions & 2 deletions
4
...ava/coffee/waffle/emcutils/utils/Log.java → ...n/java/dev/frydae/emcutils/utils/Log.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
57 changes: 11 additions & 46 deletions
57
.../coffee/waffle/emcutils/utils/Config.java → ...ae/emcutils/utils/ModMenuIntegration.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
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