mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
24 lines
452 B
TypeScript
24 lines
452 B
TypeScript
import AutoLaunch = require('auto-launch');
|
|
|
|
const minecraftAutoLauncher = new AutoLaunch({
|
|
name: 'Minecraft',
|
|
path: '/Applications/Minecraft.app',
|
|
mac: {
|
|
useLaunchAgent: true
|
|
}
|
|
});
|
|
|
|
minecraftAutoLauncher.enable();
|
|
minecraftAutoLauncher.disable();
|
|
|
|
minecraftAutoLauncher.isEnabled()
|
|
.then((isEnabled) => {
|
|
if (isEnabled) {
|
|
return;
|
|
}
|
|
minecraftAutoLauncher.enable();
|
|
})
|
|
.catch((err) => {
|
|
console.error(err);
|
|
});
|