The Minecraft RAM Calculator is an npm package that simplifies the process of determining how much RAM is required for your Minecraft server, based on various server and player-related factors. This tool helps server administrators optimize their server's performance by ensuring they allocate the appropriate amount of memory.
- Easy-to-use JavaScript library for calculating required RAM.
- Supports various Minecraft server configurations and player counts.
- Provides recommendations for optimal RAM allocation.
- Helps prevent server lag and crashes due to insufficient memory.
You can install the Minecraft RAM Calculator package via npm:
npm install minecraft-ram-calculator
const mrc = require('minecraft-ram-calculator');
// Example usage:
const maxPlayersPerInstance = 8; // Set the maximum players on the instance
const maxInstances = 7; // Set your maximum instances here.
const numPlayers = 100; // The number of players on your server
const ramNeeded = mrc.calculateRAMNeeded(numPlayers, maxPlayersPerInstance, maxInstances);
console.log(`For ${numPlayers} players, you need ${ramNeeded.ramNeeded} GB RAM.`);
console.log(`This will use ${ramNeeded.instances} instances, leaving ${ramNeeded.playersLeftOut} players left out.`);
You will have to define the max players you want in every instance. For example, as bedwars solos have the limit of 8 players, this value will be 8.
If you don't want to have a limit, you can add the ins
argument:
const ramNeeded = mrc.calculateRAMNeeded(numPlayers, maxPlayersPerInstance, maxInstances, ins = false);
You can customize the serverProperties
object to match your server's specific settings. The calculateRAM
function will take these properties into account when making its recommendation.
This project is licensed under the MIT License.
We welcome contributions from the community! To contribute to the Minecraft RAM Calculator project, follow these steps:
-
Fork this repository.
-
Clone your forked repository to your local machine.
-
Create a new branch for your contribution:
git checkout -b feature/my-contribution
Replace feature/my-contribution
with a descriptive branch name.
-
Make your changes and commit them with clear and concise commit messages.
-
Push your changes to your forked repository:
git push origin feature/my-contribution
-
Create a pull request (PR) from your forked repository to this main repository.
-
Describe your changes and the rationale behind them in the PR description.
-
Our team will review your PR, provide feedback if needed, and merge it when it's ready.
Thank you for contributing to the Minecraft RAM Calculator project!
If you have any questions, issues, or feature requests, please open an issue on our GitHub repository.
Happy gaming!