diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9ddc992 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# Use a base image that supports Java 8, as required by Paper 1.12.2 +FROM openjdk:8-jre + +# Install necessary dependencies +RUN apt-get update && apt-get install -y wget + +# Create a directory for the Minecraft server +WORKDIR /workspaces/minecraft-server + +# Download and set up the Paper 1.12.2 server +RUN wget https://api.papermc.io/v2/projects/paper/versions/1.12.2/builds/1620/downloads/paper-1.12.2-1620.jar -O paperclip.jar +RUN java -jar paperclip.jar --nogui + +# Accept the EULA +RUN echo "eula=true" > eula.txt + diff --git a/get-latest-showscript.sh b/get-latest-showscript.sh new file mode 100644 index 0000000..157bc4c --- /dev/null +++ b/get-latest-showscript.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Fetch the latest ShowScript release jar from the GitHub repository +LATEST_RELEASE=$(curl -s https://api.github.com/repos/MCParks/ShowScript/releases/latest | grep -oP '"browser_download_url": "\K(.*)(?=")') + +# Ensure the script saves the downloaded jar to the plugins directory +wget $LATEST_RELEASE -O /workspaces/minecraft-server/plugins/showscript.jar diff --git a/get-plugins.sh b/get-plugins.sh new file mode 100644 index 0000000..97e8650 --- /dev/null +++ b/get-plugins.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Download WorldGuard and WorldEdit plugins +wget https://dev.bukkit.org/projects/worldguard/files/2610618/download -O /workspaces/minecraft-server/plugins/worldguard.jar +wget https://dev.bukkit.org/projects/worldedit/files/2597538/download -O /workspaces/minecraft-server/plugins/worldedit.jar