Jump to content

Spigot (BuildTools) script for updating and installing Spigot/Craftbukkit


Dennis

Recommended Posts

We use the following bash script to keep Spigot/Craftbukkit updated:

Updatespigot.sh:

 

#!/bin/bash
cd /path/to/buildtools-directory
_JAVA_OPTIONS=-Djdk.net.URLClassPath.disableClassPathURLCheck=true java -jar -Xmx1024M BuildTools.jar --rev $1
cp spigot-$1.jar /path/to/gamefiles/minecraft/TCA.Mods/spigot.jar
cp spigot-$1.jar /path/to/gamefiles/minecraft/TCA.Updates/spigot.jar
cp spigot-$1.jar /path/to/gamefiles/minecraft/TCA.Updates/spigot-$1.jar
cp CraftBukkit/target/craftbukkit-$1-R0.1-SNAPSHOT.jar /path/to/gamefiles/minecraft/TCA.Mods/craftbukkit.jar
cp CraftBukkit/target/craftbukkit-$1-R0.1-SNAPSHOT.jar /path/to/gamefiles/minecraft/TCA.Updates/craftbukkit.jar
cp CraftBukkit/target/craftbukkit-$1-R0.1-SNAPSHOT.jar /path/to/gamefiles/minecraft/TCA.Updates/craftbukkit-$1.jar
cp spigot-$1.jar /path/to/gamefiles/minecraft/spigot.jar
cp CraftBukkit/target/craftbukkit-$1-R0.1-SNAPSHOT.jar /path/to/gamefiles/minecraft/craftbukkit.jar

Run it like this:

 

sh /path/to/buildtools-directory/updatespigot.sh 1.14.2

The above command will install Spigot and Craftbukkit v 1.14.2 and place it into the appropriate folders.

 

 

Now you should go to the game config file, add a new update (file name would be spigot-1.14.2.jar fx).

Create a custom script for the update with the following:

import sys
sys.path.append(ThisServer.CustomField1) #Assuming Python 2.7 has been installed and path to the /Lib folder is specified in Servers > Servername > Custom Field 1
from shutil import move
move(ThisService.RootDirectory + "spigot-1.14.2.jar", ThisService.RootDirectory + "spigot.jar")

You can setup a cron job to run every hour to update the files.

Link to comment
Share on other sites

  • 1 month later...
Hey, Possible to get this for windows server?

Sure. Create a .bat file with the following:

 

 

java -Xmx1024M -jar BuildTools.jar --rev %1
xcopy spigot-%1.jar D:\Path\To\minecraft\TCA.Mods\spigot.jar* /Y
xcopy spigot-%1.jar D:\Path\To\minecraft\TCA.Updates\spigot.jar* /Y
xcopy spigot-%1.jar D:\Path\To\minecraft\TCA.Updates\spigot-%1.jar* /Y
xcopy CraftBukkit\target\craftbukkit-%1-R0.1-SNAPSHOT.jar D:\Path\To\minecraft\TCA.Mods\craftbukkit.jar* /Y
xcopy CraftBukkit\target\craftbukkit-%1-R0.1-SNAPSHOT.jar D:\Path\To\minecraft\TCA.Updates\craftbukkit.jar* /Y
xcopy CraftBukkit\target\craftbukkit-%1-R0.1-SNAPSHOT.jar D:\Path\To\minecraft\TCA.Updates\craftbukkit-%1.jar* /Y
xcopy spigot-%1.jar D:\Path\To\minecraft\spigot.jar* /Y
xcopy CraftBukkit\target\craftbukkit-%1-R0.1-SNAPSHOT.jar D:\Path\To\minecraft\craftbukkit.jar* /Y

 

 

The script is used like on Linux: "UpdateSpigot.sh 1.14.4" will download and build v. 1.14.4.

Link to comment
Share on other sites

  • 1 year later...

Where i create or configure this in panel?  Thank you 

 

 

On 8/6/2019 at 11:40 AM, Dennis said:

Sure. Create a .bat file with the following:

 

 

 


java -Xmx1024M -jar BuildTools.jar --rev %1
xcopy spigot-%1.jar D:\Path\To\minecraft\TCA.Mods\spigot.jar* /Y
xcopy spigot-%1.jar D:\Path\To\minecraft\TCA.Updates\spigot.jar* /Y
xcopy spigot-%1.jar D:\Path\To\minecraft\TCA.Updates\spigot-%1.jar* /Y
xcopy CraftBukkit\target\craftbukkit-%1-R0.1-SNAPSHOT.jar D:\Path\To\minecraft\TCA.Mods\craftbukkit.jar* /Y
xcopy CraftBukkit\target\craftbukkit-%1-R0.1-SNAPSHOT.jar D:\Path\To\minecraft\TCA.Updates\craftbukkit.jar* /Y
xcopy CraftBukkit\target\craftbukkit-%1-R0.1-SNAPSHOT.jar D:\Path\To\minecraft\TCA.Updates\craftbukkit-%1.jar* /Y
xcopy spigot-%1.jar D:\Path\To\minecraft\spigot.jar* /Y
xcopy CraftBukkit\target\craftbukkit-%1-R0.1-SNAPSHOT.jar D:\Path\To\minecraft\craftbukkit.jar* /Y
 

 

 

 

The script is used like on Linux: "UpdateSpigot.sh 1.14.4" will download and build v. 1.14.4.

 

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Who's Online   0 Members, 0 Anonymous, 22 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use