Create configmanager.js
Add methods for set test mode and check if test mode
This commit is contained in:
parent
779a9a54ec
commit
4b06d48e41
@ -103,7 +103,8 @@ const DEFAULT_CONFIG = {
|
|||||||
selectedServer: null, // Resolved
|
selectedServer: null, // Resolved
|
||||||
selectedAccount: null,
|
selectedAccount: null,
|
||||||
authenticationDatabase: {},
|
authenticationDatabase: {},
|
||||||
modConfigurations: []
|
modConfigurations: [],
|
||||||
|
testDistro: false
|
||||||
}
|
}
|
||||||
|
|
||||||
let config = null
|
let config = null
|
||||||
@ -158,6 +159,14 @@ exports.load = function(){
|
|||||||
logger.log('Successfully Loaded')
|
logger.log('Successfully Loaded')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exports.setTesting = function(v){
|
||||||
|
config.testDistro = v ? true: false
|
||||||
|
exports.save()
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.isTesting = function(){
|
||||||
|
return config.testDistro
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @returns {boolean} Whether or not the manager has been loaded.
|
* @returns {boolean} Whether or not the manager has been loaded.
|
||||||
*/
|
*/
|
||||||
@ -685,4 +694,4 @@ exports.getAllowPrerelease = function(def = false){
|
|||||||
*/
|
*/
|
||||||
exports.setAllowPrerelease = function(allowPrerelease){
|
exports.setAllowPrerelease = function(allowPrerelease){
|
||||||
config.settings.launcher.allowPrerelease = allowPrerelease
|
config.settings.launcher.allowPrerelease = allowPrerelease
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user