Skip to content

Commit c28a76c

Browse files
committed
Update devcontainer setup
1 parent c487aeb commit c28a76c

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

sandbox/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,18 @@ ENV LEVEL_TYPE=FLAT
1313
ENV MOTD=ShowScriptSandbox
1414
ENV ALLOW_NETHER=FALSE
1515

16+
# Install OpenJDK 21
17+
RUN apt-get update && \
18+
apt-get install -y openjdk-21-jdk && \
19+
apt-get clean;
20+
21+
# Set JAVA_HOME environment variable
22+
ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
23+
ENV PATH=$JAVA_HOME/bin:$PATH
24+
1625
# Expose the Minecraft server port
1726
EXPOSE 25565
1827

28+
29+
1930
ENTRYPOINT [ "" ]

sandbox/scripts/build-plugin.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cd "$(dirname "$0")/../.."
77
./gradlew build
88

99
# Ensure the plugins directory exists
10-
mkdir -p /workspaces/ShowScript/sandbox/server/plugins
10+
mkdir -p /workspaces/ShowScript/sandbox/data/plugins
1111

1212
# Move the built plugin jar to the plugins directory
13-
mv build/libs/showscript.jar /workspaces/ShowScript/sandbox/server/plugins/
13+
mv build/libs/showscript.jar /workspaces/ShowScript/sandbox/data/plugins/

sandbox/scripts/download-plugins.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Navigate to the plugins directory
4-
cd /workspaces/ShowScript/sandbox/server/plugins
4+
cd /workspaces/ShowScript/sandbox/data/plugins
55

66
# Read each line from the CSV file
77
while IFS=, read -r pluginName directDownloadUrl

sandbox/scripts/setup-environment.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
ln -s /data /workspaces/ShowScript/sandbox
23

34
# Run script to build ShowScript
45
bash /workspaces/ShowScript/sandbox/scripts/build-plugin.sh
@@ -11,6 +12,6 @@ bash /workspaces/ShowScript/sandbox/scripts/download-plugins.sh
1112
# Start the Minecraft server
1213
cd /workspaces/ShowScript/sandbox
1314

14-
ln -s /data /workspaces/ShowScript/sandbox
15+
1516

1617
# Attach the VSCode Console to the Minecraft server

0 commit comments

Comments
 (0)