mirror of
https://github.com/artegoser/pimi-launcher-core.git
synced 2025-02-23 20:51:30 +03:00
Update License and reformat some things
Not a major change also removed the forced `-Xincgc` .
This commit is contained in:
parent
ff8637536b
commit
cd698c9f1b
4 changed files with 9 additions and 12 deletions
|
@ -3,7 +3,7 @@ const uuid = require('uuid/v1');
|
|||
const api_url = "https://authserver.mojang.com";
|
||||
|
||||
|
||||
function getAuth(username, password) {
|
||||
module.exports.getAuth = function (username, password) {
|
||||
return new Promise(resolve => {
|
||||
if(!password) {
|
||||
const user = {
|
||||
|
@ -49,9 +49,9 @@ function getAuth(username, password) {
|
|||
resolve(userProfile);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function validate(access_token) {
|
||||
module.exports.validate = function (access_token) {
|
||||
return new Promise(resolve => {
|
||||
const requestObject = {
|
||||
url: api_url + "/validate",
|
||||
|
@ -66,9 +66,9 @@ function validate(access_token) {
|
|||
if(!body) resolve(true); else resolve(false);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function refreshAuth(accessToken, clientToken, selectedProfile) {
|
||||
module.exports.refreshAuth = function (accessToken, clientToken, selectedProfile) {
|
||||
return new Promise(resolve => {
|
||||
const requestObject = {
|
||||
url: api_url + "/refresh",
|
||||
|
@ -98,6 +98,4 @@ function refreshAuth(accessToken, clientToken, selectedProfile) {
|
|||
resolve(userProfile);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {getAuth, validate, refreshAuth};
|
||||
};
|
|
@ -38,8 +38,7 @@ module.exports = async function (options) {
|
|||
'-Dfml.ignoreInvalidMinecraftCertificates=true',
|
||||
`-Djava.library.path=${nativePath}`,
|
||||
`-Xmx${options.memory.max}M`,
|
||||
`-Xms${options.memory.min}M`,
|
||||
'-Xincgc'
|
||||
`-Xms${options.memory.min}M`
|
||||
];
|
||||
jvm.push(await handler.getJVM(versionFile, options));
|
||||
if(options.customArgs) jvm = jvm.concat(options.customArgs);
|
||||
|
|
Loading…
Add table
Reference in a new issue