- Started to work on the Update-Script

- Added more Plugins
This commit is contained in:
kB01guy 2021-06-19 02:05:47 +02:00
parent e486b57485
commit 67ff78b4de
2 changed files with 68 additions and 1 deletions

View file

@ -48,7 +48,7 @@ cd ${BASEDIR}/tools/buildtools && curl -O https://hub.spigotmc.org/jenkins/job/B
&& java -jar BuildTools.jar --rev 1.17 && java -jar BuildTools.jar --rev 1.17
# Setup Server-Space # Setup Server-Space
cd ${BASEDIR}/server && cp ${BASEDIR}/tools/buildtools/spigot-1.17.jar ./spigot.jar cd ${BASEDIR}/server && cp ${BASEDIR}/tools/buildtools/spigot*.jar ./spigot.jar
# Download Plugins # Download Plugins
cd ${BASEDIR}/server/plugins cd ${BASEDIR}/server/plugins
@ -74,3 +74,18 @@ cd ${BASEDIR}/server && cp ${BASEDIR}/tools/buildtools/spigot-1.17.jar ./spigot.
# emotecraft https://www.curseforge.com/minecraft/bukkit-plugins/emotecraft-bukkit # emotecraft https://www.curseforge.com/minecraft/bukkit-plugins/emotecraft-bukkit
LATEST=$(get_latest_release KosmX/emotes) LATEST=$(get_latest_release KosmX/emotes)
curl -OL https://github.com/KosmX/emotes/releases/download/${LATEST}/emotecraft-2.0.5-bukkit.jar curl -OL https://github.com/KosmX/emotes/releases/download/${LATEST}/emotecraft-2.0.5-bukkit.jar
# Multiverse https://www.curseforge.com/minecraft/bukkit-plugins/multiverse-core
curl -OL https://media.forgecdn.net/files/3074/594/Multiverse-Core-4.2.2.jar
# MV-inventories https://www.curseforge.com/minecraft/bukkit-plugins/multiverse-inventories
curl -OL https://media.forgecdn.net/files/3222/929/Multiverse-Inventories-4.2.2.jar
# MV-SignPortals https://www.curseforge.com/minecraft/bukkit-plugins/multiverse-signportals
curl -OL https://media.forgecdn.net/files/3074/605/Multiverse-SignPortals-4.2.0.jar
# MV-Portals https://www.curseforge.com/minecraft/bukkit-plugins/multiverse-portals
curl -OL https://media.forgecdn.net/files/3113/114/Multiverse-Portals-4.2.1.jar
# WorldEdit (Dependency for Plot²) https://www.curseforge.com/minecraft/bukkit-plugins/worldedit
curl -OL https://media.forgecdn.net/files/3283/695/worldedit-bukkit-7.2.5-dist.jar
# Plot² https://www.curseforge.com/minecraft/bukkit-plugins/plotsquared (Buyable for 15€ here: https://www.spigotmc.org/resources/plotsquared-v5.77506/ )
curl -OL https://media.forgecdn.net/files/2932/66/PlotSquared-Bukkit-4.494.jar
# ChestShop https://www.curseforge.com/minecraft/bukkit-plugins/chestshop
LATEST=$(get_latest_release ChestShop-authors/ChestShop-3)
curl -OL https://github.com/ChestShop-authors/ChestShop-3/releases/download/${LATEST}/ChestShop.jar

52
update.sh Normal file
View file

@ -0,0 +1,52 @@
#!/bin/bash
BASEDIR=$(pwd)
# Helper
get_latest_release() { # Source: https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Stop the Server
sudo systemctl stop minecraft
sleep 10
# Update mcrcon
cd ${BASEDIR}/tools/mcrcon && git pull
gcc -std=gnu11 -pedantic -Wall -Wextra -O2 -s -o mcrcon mcrcon.c
# TODO: OpenJDK-Update (v16 required!)
# Update spigot (Rebuilding is Fine, because the BuildTools pull the required Repositories autmagically)
cd ${BASEDIR}/tools/buildtools && java -jar BuildTools.jar --rev 1.17 \
&& cp ${BASEDIR}/tools/buildtools/spigot*.jar ${BASEDIR}/server/spigot.jar
# Update Plugins
mkdir -p ${BASEDIR}/server/plugins/backup
cd ${BASEDIR}/server/plugins/backup && rm *.jar
mv ${BASEDIR}/server/plugins/*.jar ${BASEDIR}/server/plugins/backup
cd ${BASEDIR}/server/plugins/
# BackupOnEvent https://www.curseforge.com/minecraft/bukkit-plugins/backuponevent
LATEST=$(get_latest_release enayet123/BackupOnEventPlugin)
curl -OL https://github.com/enayet123/BackupOnEventPlugin/releases/download/${LATEST}/BackupOnEvent.jar
# Vault https://www.curseforge.com/minecraft/bukkit-plugins/vault
LATEST=$(get_latest_release MilkBowl/Vault)
curl -OL https://github.com/MilkBowl/Vault/releases/download/${LATEST}/Vault.jar
# Essentials https://www.curseforge.com/minecraft/bukkit-plugins/essentialsx
LATEST=$(get_latest_release EssentialsX/Essentials)
curl -OL https://github.com/EssentialsX/Essentials/releases/download/${LATEST}/EssentialsX-${LATEST}.0.jar
# floodgate-bukkit Geyser-Spigot https://geysermc.org/
wget https://ci.opencollab.dev/job/GeyserMC/job/Geyser/job/master/lastSuccessfulBuild/artifact/bootstrap/spigot/target/Geyser-Spigot.jar
wget https://ci.opencollab.dev/job/GeyserMC/job/Floodgate/job/master/lastSuccessfulBuild/artifact/spigot/target/floodgate-spigot.jar
echo "Please Download the following Plugins manually: \
GriefPrevention https://www.curseforge.com/minecraft/bukkit-plugins/grief-prevention \
ArmorStandEditor https://www.curseforge.com/minecraft/bukkit-plugins/armor-stand-edit \
emotecraft https://github.com/KosmX/emotes/releases/latest \
LuckPerms https://luckperms.net/ "