Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/garnservo/mc-startup-script
A fully-customisable, modular .bat startup script for Minecraft servers
https://github.com/garnservo/mc-startup-script
batch batch-file batch-script bukkit minecraft minecraft-launcher minecraft-server minecraft-server-setup minecraft-server-setup-script minecraft-server-software minecraft-server-startup paper pufferfish purpur server-management server-manager spigot windows
Last synced: 3 months ago
JSON representation
A fully-customisable, modular .bat startup script for Minecraft servers
- Host: GitHub
- URL: https://github.com/garnservo/mc-startup-script
- Owner: GarnServo
- License: gpl-3.0
- Created: 2024-03-17T02:41:51.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T09:29:52.000Z (4 months ago)
- Last Synced: 2024-10-11T03:03:12.725Z (3 months ago)
- Topics: batch, batch-file, batch-script, bukkit, minecraft, minecraft-launcher, minecraft-server, minecraft-server-setup, minecraft-server-setup-script, minecraft-server-software, minecraft-server-startup, paper, pufferfish, purpur, server-management, server-manager, spigot, windows
- Language: Batchfile
- Homepage: https://www.spigotmc.org/resources/mc-startup-script.115686/
- Size: 202 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# `Minecraft Startup Script`
![GitHub Release](https://img.shields.io/github/v/release/GarnServo/mc-startup-script?style=for-the-badge&logo=github&labelColor=1a1a1a&color=EB5B27)### A fully-customisable, modular .bat startup script for Minecraft servers, where all variables can be modified on the fly and applied upon server restart.
## Features
1️⃣ Toggleable auto-restart
2️⃣ Customisable JVM arguments/flags - including optional optimised preset
3️⃣ Customisable RAM allocation
4️⃣ Auto-generate+accept EULA
5️⃣ GUI toggle
6️⃣ Customisable console title
7️⃣ Discord webhook integration
8️⃣ Auto-updates with latest version from GitHub## Requirements
- Windows OS
- Java 17## How to Use
1. Download the script's [latest release](https://github.com/GarnServo/mc-startup-script/releases/latest) (ensure it is saved as a '.bat').
2. Place it in your Minecraft server's root directory.
3. Run the script by either double clicking the file, or executing via CMD.
4. Upon first use, the script will run you through the configuration prompts.To edit configurations:
JVM arguments = /config/jvm_args.txt
Script config = /config/StartupScript.confTo apply configuration changes while the script is still running (i.e. console is still open), simply restart the Minecraft server.
No need to restart the script.## Screenshots
![Configuration Screenshot](https://raw.githubusercontent.com/GarnServo/mc-startup-script/main/imgs/Config.png)
![Console Screenshot](https://raw.githubusercontent.com/GarnServo/mc-startup-script/main/imgs/Console_launch.png)
## Functionality
### First Launch/Initial Setup
- [X] Prompts user for server .jar filename. Checks if the file exists.
- [X] Prompts user to allocate initial and maximum RAM for the server. Checks if entry is a valid value.
- [X] Queries user whether the server should auto-restart or not.
- [X] Queries user whether server should use pre-configured JVM arguments. Regardless of result, will generate file for flag storage.
- [X] Queries user whether to launch with GUI.
- [X] Queries user whether to use Discord webhooks. If yes, user inputs webhook URL.
- [X] Lets user confirm choices. If confirmed, continue to normal startup. If rejected, will restart initial configuration.
- [X] Stores configuration in /config/StartupScript.conf, and JVM args in /config/jvm_args.txt.
- [X] Generates auto-accepted EULA.
### Normal Startup
- [X] Checks for updates to this script.
- [X] Checks for config folder, config file, and sets restart counter. If config is missing, reverts back to initial setup.
- [X] Checks for EULA, if non-existent, creates accepted eula.txt.
- [X] Reads script config file and stores contents as environment variables.
- [X] Displays configuration to user and initialises the server.
- [X] Checks for JVM arguments file, if non-existent, will create one with optimised flags. If it exists, loads the args into an environment variable.
- [X] Checks auto-restart config to decide launch path.
#### Auto-Restart Enabled
- [X] Launches server, changes console title to the configurable title + restart count, and (if configured) sends Discord message.
- [X] Upon crash or restart, increments the restart counter, reloads configuration + JVM flags, and (if configured) sends Discord message.
#### Auto-Restart Disabled
- [X] Launches server and changes console title to the configurable title, and (if configured) sends Discord message.
- [X] Upon crash or restart, prompts user whether to restart or exit, and (if configured) sends Discord message.### Planned
- [ ] Improve text formatting
- [ ] Update server .jar to latest, within Minecraft version.
_e.g. paper 1.20.4 build 460 > paper 1.20.4 > build 461_## Disclaimer
By using this script, you are indicating your agreement to the [Minecraft EULA](https://aka.ms/MinecraftEULA).## License
[GNU GPLv3](https://choosealicense.com/licenses/gpl-3.0/)