forked from koxx12-dev/Skyclient-Cosmetics
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stop replaymod from automatically recording
- Loading branch information
Showing
7 changed files
with
108 additions
and
3 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
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,10 @@ | ||
package com.replaymod.core; | ||
|
||
public class ReplayMod { | ||
|
||
public static ReplayMod instance; | ||
|
||
public SettingsRegistry getSettingsRegistry() { | ||
return new SettingsRegistry(); | ||
} | ||
} |
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 com.replaymod.core; | ||
|
||
public class SettingsRegistry { | ||
|
||
public <T> void set(SettingKey<T> key, T value) { | ||
// dummy | ||
} | ||
|
||
public void save() { | ||
// dummy | ||
} | ||
|
||
public interface SettingKey<T> { | ||
String getCategory(); | ||
String getKey(); | ||
String getDisplayString(); | ||
T getDefault(); | ||
} | ||
|
||
public static class SettingKeys<T> implements SettingKey<T> { | ||
private final String category; | ||
private final String key; | ||
private final String displayString; | ||
private final T defaultValue; | ||
|
||
public SettingKeys(String category, String key, String displayString, T defaultValue) { | ||
this.category = category; | ||
this.key = key; | ||
this.displayString = displayString; | ||
this.defaultValue = defaultValue; | ||
} | ||
|
||
@Override | ||
public String getCategory() { | ||
return category; | ||
} | ||
|
||
@Override | ||
public String getKey() { | ||
return key; | ||
} | ||
|
||
@Override | ||
public String getDisplayString() { | ||
return displayString; | ||
} | ||
|
||
@Override | ||
public T getDefault() { | ||
return defaultValue; | ||
} | ||
} | ||
} |
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,15 @@ | ||
package com.replaymod.recording; | ||
|
||
import com.replaymod.core.SettingsRegistry; | ||
|
||
public final class Setting<T> extends SettingsRegistry.SettingKeys<T> { | ||
public static final Setting<Boolean> AUTO_START_RECORDING = make("autoStartRecording", "autostartrecording", true); | ||
|
||
private static <T> Setting<T> make(String key, String displayName, T defaultValue) { | ||
return new Setting<>(key, displayName, defaultValue); | ||
} | ||
|
||
public Setting(String key, String displayString, T defaultValue) { | ||
super("recording", key, displayString == null ? null : "replaymod.gui.settings." + displayString, defaultValue); | ||
} | ||
} |
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