-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstallJava
More file actions
70 lines (58 loc) · 2.08 KB
/
installJava
File metadata and controls
70 lines (58 loc) · 2.08 KB
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
70
#!/bin/bash
export THIS_DIR=$PWD
export DEBIAN_FRONTEND=noninteractive
GREEN="\e[32m"
CYAN="\e[36m"
YELLOW="\e[33m"
RED="\e[31m"
GRAY="\e[90m"
RESET="\e[0m"
clear
echo -e "${CYAN}╔══════════════════════════════════════╗"
echo -e "║ Minecraft Java Server Installer ║"
echo -e "╚══════════════════════════════════════╝${RESET}"
# ===== DEPENDENSI =====
echo -e "${CYAN}> Memperbarui sistem & memasang alat...${RESET}"
sudo apt update -qq
sudo apt install -y -qq screen neofetch curl
echo ""
echo -e "${YELLOW}INFO:${RESET} Menggunakan API mcutils.com"
echo -e "${GRAY}Versi yang tersedia mungkin terbatas${RESET}"
echo ""
# ===== MENU =====
echo -e "${CYAN}Pilih tipe server:${RESET}"
echo ""
echo -e " [1] Vanilla"
echo -e " [2] Paper"
echo ""
read -rp "Pilihan [1-2]: " SERVER_TYPE
case "$SERVER_TYPE" in
1)
echo -e "${GREEN}> Memasang Vanilla Server${RESET}"
bash <(curl -s https://raw.githubusercontent.com/hapis1703/minecraftserver/main/Java/vanilla)
;;
2)
echo -e "${GREEN}> Memasang Paper Server${RESET}"
bash <(curl -s https://raw.githubusercontent.com/hapis1703/minecraftserver/main/Java/paper)
;;
*)
echo -e "${RED}> Pilihan tidak valid. Mengulang installer...${RESET}"
sleep 1
bash <(curl -s https://raw.githubusercontent.com/hapis1703/minecraftserver/main/installJava)
exit 1
;;
esac
# ===== PLAYIT.GG =====
echo -e "\n${CYAN}> Memasang Playit.gg...${RESET}"
cd ..
curl -SsL https://playit-cloud.github.io/ppa/key.gpg \
| gpg --dearmor \
| sudo tee /etc/apt/trusted.gpg.d/playit.gpg >/dev/null
echo "deb [signed-by=/etc/apt/trusted.gpg.d/playit.gpg] https://playit-cloud.github.io/ppa/data ./" \
| sudo tee /etc/apt/sources.list.d/playit-cloud.list >/dev/null
sudo apt update -qq
sudo apt install -y -qq playit
echo ""
echo -e "${GREEN}✔ Instalasi selesai!${RESET}"
echo -e "${CYAN}> Mulai server dengan:${RESET} ./start"
echo ""