-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstart.sh
More file actions
34 lines (28 loc) · 961 Bytes
/
start.sh
File metadata and controls
34 lines (28 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
export LANG=C.UTF-8
echo "PowerNukkitX server software for Minecraft: Bedrock Edition"
# Check if Java is installed
if ! java -version &> /dev/null
then
echo "Java is not installed. Please install Java 21 or higher."
echo "You can refer to the installation instructions at https://docs.powernukkitx.org/installation/linux"
exit 1
fi
# Check if powernukkitx.jar exists
if [ ! -f "powernukkitx.jar" ]; then
echo "PowerNukkitX.jar not found"
echo "You can download the file from https://github.com/PowerNukkitX/PowerNukkitX/releases"
exit 1
fi
JAVA_CMD="java"
JAR_NAME="powernukkitx.jar"
$JAVA_CMD -Dfile.encoding=UTF-8 \
-Djansi.passthrough=true \
-Dterminal.ansi=true \
-XX:+UseZGC \
-XX:+ZGenerational \
-XX:+UseStringDeduplication \
--add-opens java.base/java.lang=ALL-UNNAMED \
--add-opens java.base/java.io=ALL-UNNAMED \
--add-opens java.base/java.net=ALL-UNNAMED \
-jar $JAR_NAME