-
Notifications
You must be signed in to change notification settings - Fork 0
/
run
69 lines (48 loc) · 2.07 KB
/
run
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
classifier="dev"
[[ $1 == "reobf" ]] && classifier="reobf"
[[ $1 == "clip" ]] && classifier="clip"
####################### Configuration Section #####################
# Use following variables as global-scope
set -a
######################## Upstream Settings #########################
REPO_BASE_URL="https://raw.githubusercontent.com/monun/minecraft-server-launcher"
REPO_BRANCH="master"
REPO_ROOT="$REPO_BASE_URL/$REPO_BRANCH"
REPO_DEPLOY="$REPO_ROOT/deploy"
########################## Configurations ##########################
## Server directory name
DIR=".server"
## Server type (local path or type[vanilla, spigot, paper]-version[1.xx.x, unspecified]-build[latest, unspecified, xx]-[dev])
SERVER="paper-1.20.1-latest-$classifier"
## Server memory (GB)
MEMORY=4
## When the server shuts down, use tar to back up.
BACKUP=false
## The server will always restart.
RESTART=false
################## Spigot or Paper Configurations ##################
## The maximum amount of players that the server will allow, this will bypass the max-players= value in server.properties file.
PLAYERS=100
## This parameter allows you to manually define the plugins directory to use for the server.
PLUGINS="plugins-$classifier"
## This parameter will put all worlds your server uses into a specific directory, it's useful if you have many folders inside in the main server directory.
WORLDS="worlds"
## Server port, default value from server.properties (25565)
PORT=-1
## jdwp port, Enable debug mode when 0 or higher (5005)
DEBUG_PORT=5005
# Preinstallation plugins (url)
DEFAULT_PLUGINS=(
'https://github.com/monun/auto-reloader/releases/download/0.0.5/auto-reloader-0.0.6.jar'
)
# Uncomment to enable OpenJ9 performance tuning for VMs
# VIRTUALIZED=true
# Use following variables as local-scope
set +a
####################### End of Configuration ######################
# Setup target directory
mkdir -p "$DIR" && cd "$DIR" || exit
[[ ! -f ./startSetup ]] && wget -q -c --content-disposition -P . -N "$REPO_DEPLOY/startSetup" >/dev/null
chmod +x ./startSetup
./startSetup "${DEFAULT_PLUGINS[@]}"