Skip to content

Commit

Permalink
Feat/forge support (#23)
Browse files Browse the repository at this point in the history
* new link to discussions for support

* added forge support
  • Loading branch information
Okazakee committed Oct 11, 2023
1 parent 1f3be47 commit 613f196
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This image provides a basic Minecraft server using one of the supported provider

# Supported server providers:
### [Vanilla](https://www.minecraft.net/) | [Paper](https://papermc.io/) | [Purpur](https://purpurmc.org/) | [Fabric](https://fabricmc.net/)
Wamt more? Let me know in the [issues](https://github.com/Okazakee/mcserver-lazymc-docker/issues).
Wamt more? Let me know in the [discussions](https://github.com/Okazakee/mcserver-lazymc-docker/discussions).

# Usage
It is assumed that the user has already acquired a working Docker installation. If that is not the case, [go do that](https://www.docker.com/get-started/) and come back here when you're done.
Expand Down
15 changes: 10 additions & 5 deletions mcserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ else
fi

# Declaring supported types
allowed_modded_type="fabric"
allowed_modded_type="fabric forge"
allowed_servers_type="paper purpur"

# Determine server type
Expand Down Expand Up @@ -172,10 +172,15 @@ then
# Run the server once to generate eula.txt
echo "\033[0;33mGenerating EULA... \033[0m"
echo ""
if ! java -jar ${JAR_NAME} > /dev/null 2>&1
then
echo "\033[0;31mError: Cannot generate EULA. Exiting... \033[0m" | tee server_cfg.txt
exit 1
if [ "$SERVER_PROVIDER" == "forge" ]; then
java -jar ${JAR_NAME} --installServer > /dev/null 2>&1
else
java -jar ${JAR_NAME} > /dev/null 2>&1
fi

if [ $? -ne 0 ]; then
echo "\033[0;31mError: Cannot generate EULA. Exiting... \033[0m" | tee server_cfg.txt
exit 1
fi
# Edit eula.txt to accept the EULA
echo "\033[0;33mAccepting EULA... \033[0m"
Expand Down

0 comments on commit 613f196

Please sign in to comment.