
Security News
High Salaries No Longer Enough to Attract Top Cybersecurity Talent
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
minecraft-wrap
Advanced tools
Download and wrap the vanilla minecraft server and client in node.js.
To install a downloadMinecraft and a runMinecraft command line programs, run:
npm install -g minecraft-wrap
downloadMinecraft 1.8.8 1.8.8.jar server
runMinecraft [<minecraft dir>] [<version>] [<username>] [<password>] [<stop>]
See examples
download the vanilla server of version minecraftVersion
jar file at filename
.
It checks with a md5 hash that the file downloaded is correct and it doesn't download it if the destination file is already the correct file.
download the vanilla client of version minecraftVersion
jar file at filename
.
os: 'win' | 'linux'
version: valid bedrock version (ie: '1.16.220')
outputPath: name of folder to extract server to
suffixVersion: the name of the outputFolder will be suffixed to the end of the folder name, ie: output
to output1.16.220
download + unzip the bedrock server
initialize a wrapper with jar MC_SERVER_JAR
, store mc server file at MC_SERVER_PATH
OPTIONS
is an object containing the following optional properties:
new RegExp(/\[Server thread\/INFO\]: Done/)
java
start the minecraft server with properties overrides propOverrides
. Calls done
when the server is started.
stop the minecraft server, calls done
when the server is stopped.
delete the minecraft server data.
write line
to the server.
the Wrap instance emit that event when the server write a line
create a client wrapper instance
clientPath
as minecraft directory (or the default os specific path if undefined)version
(or the version of the selected profile if undefined)prepare all the files requires for the minecraft client in the minecraft directory.
return a promise
authenticate the user using username
and password
.
If these parameters are undefined, the selected user in the profile is used
return a promise
set the authentication information directly without contacting the mojang servers.
playerName
, uuid
, accessToken
and userProperties
need to be provided.
start the client
return a promise that is resolved when the client is properly started
stop the client
return a promise that is resolved when the client is stopped
create a launcher downloader with mcPath
as minecraft directory path
get the client jar, the assets, the libraries and extract the native libraries for the version version
.
return an object of arrays of the paths of the downloaded files
get and return a promise of the version list
get and save the version infos and return a promise of it
get and save the asset index and return a promise of it
get all the assets, save them and return a promise of an array of the paths
get the asset assetFile
, save it and return a promise of its path
get the client jar, save it and return return a promise of its path
get the server jar, save it and return return a promise of its path
extract the natives files and return a promise to the path of the dir
get all the libraries, save them and return a promise of an array of the paths
The MC_SERVER_JAR environment variable must be defined and point the .jar location before calling npm test.
FAQs
Download and wrap the vanilla minecraft server in node.js
The npm package minecraft-wrap receives a total of 1,426 weekly downloads. As such, minecraft-wrap popularity was classified as popular.
We found that minecraft-wrap demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.