LoaderProperties.java
3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package com.mumfrey.liteloader.launch;
/**
* Interface for the object which will manage loader properties (internal and volatile)
*
* @author Adam Mummery-Smith
*/
public interface LoaderProperties
{
/**
* True if the "load tweaks" option is enabled and enumerator modules
*/
public abstract boolean loadTweaksEnabled();
/**
* Get the mod pack branding from the non-volatile store
*/
public abstract String getBranding();
/**
* Set a boolean property in the properties file
*
* @param propertyName
* @param value
*/
public abstract void setBooleanProperty(String propertyName, boolean value);
/**
* Get a boolean property from the properties file
*
* @param propertyName
*/
public abstract boolean getBooleanProperty(String propertyName);
/**
* Get a boolean property but write and return the supplied default value if the property doesn't exist
*
* @param propertyName
* @param defaultValue
*/
public abstract boolean getAndStoreBooleanProperty(String propertyName, boolean defaultValue);
/**
* Set an integer property in the properties file
*
* @param propertyName
* @param value
*/
public abstract void setIntegerProperty(String propertyName, int value);
/**
* Get an integer property from the properties file
*
* @param propertyName
*/
public abstract int getIntegerProperty(String propertyName);
/**
* Get an integer property but write and return the supplied default value if the property doesn't exist
*
* @param propertyName
* @param defaultValue
*/
public abstract int getAndStoreIntegerProperty(String propertyName, int defaultValue);
/**
* Get a stored mod revision number from the properties file
*
* @param modKey
*/
public abstract int getLastKnownModRevision(String modKey);
/**
* Store a mod revision number in the properties file
*
* @param modKey
*/
public abstract void storeLastKnownModRevision(String modKey);
/**
* Write the properties to disk
*/
public abstract void writeProperties();
// General properties
public static final String OPTION_SOUND_MANAGER_FIX = "soundManagerFix";
public static final String OPTION_MOD_INFO_SCREEN = "modInfoScreen";
public static final String OPTION_NO_HIDE_TAB = "tabAlwaysExpanded";
public static final String OPTION_BRAND = "brand";
public static final String OPTION_LOADING_BAR = "loadingbar";
public static final String OPTION_FORCE_UPDATE = "allowForceUpdate";
public static final String OPTION_UPDATE_CHECK_INTR = "updateCheckInterval";
public static final String OPTION_JINPUT_DISABLE = "disableJInput";
// Enumerator properties
public static final String OPTION_SEARCH_MODS = "search.mods";
public static final String OPTION_SEARCH_JAR = "search.jar";
public static final String OPTION_SEARCH_CLASSPATH = "search.classpath";
public static final String OPTION_SEARCH_ZIPFILES = "search.zipfiles";
public static final String OPTION_SEARCH_JARFILES = "search.jarfiles";
}