Initial commit

This commit is contained in:
David J Pfeiffer 2018-12-21 14:55:48 -06:00
commit 43d8729001
3 changed files with 58 additions and 0 deletions

7
.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
# Ignore all generated files
*
# Source control git ignore file, Git bash script, README, and Build Tools
!.gitignore
!build.sh
!README.md

25
README.md Normal file
View File

@ -0,0 +1,25 @@
# Spigot
The fastest and easiest way to download any version of Spigot.
This repository uses the [Spigot](https://www.spigotmc.org/) [Build Tools](https://www.spigotmc.org/wiki/buildtools/) and a [Git](https://git-scm.com/) bash script to run a Spigot build for a specific [Minecraft](https://minecraft.net) version.
This is accomplished by running the script and passing in the version of Minecraft you want to use as a parameter. When running this command, a new directory will be created for the version you pass in, and the `BuildTools.jar` file will be used to generate the desired files in that directory. If the directory already exists, it will be overwritten for this version. You can keep mutliple versions, all of which will be usable on your computer. This repository should always contain the latest version of the Build Tools, and will automatically update before you run the script, which guarentees that you are always using the latest version of the Build Tools. This makes it easy to obtain and manage multiple different versions of Spigot on your local machine.
### Usage
Run `build.sh <version>` from the command line.
For example, `build.sh 1.12.2` will output the Spigot files for Minecraft version 1.12.2 in a newly created directory.
### But Why?
Why is this necessary? Why should I use this repository to obtain a Spigot build? Why can't I just download the files I want online?
This is a good question. The answer is that distributing copyrighted intillectual property over the internet is illegal. Because Spigot is built ontop of Minecraft, it is illegal to distribute the files from a Spigot build online because those files include Minecraft source files, which are the coprighted intillectual property of Mojang.
To get around this, you must generate the files yourself using the Build Tools provided by Spigot. You can then legally use these files to run a server and develop plugins for Minecraft servers.
### Legal
This project is in no way affiliated with [Minecraft](https://minecraft.net), [Mojang](https://mojang.com), [Microsoft](https://www.microsoft.com/en-us/), [Spigot](https://www.spigotmc.org/), [Bukkit](https://bukkit.org/), or any other organization.

26
build.sh Normal file
View File

@ -0,0 +1,26 @@
git fetch
curl https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar --output BuildTools.jar
if [ -z "$(git status --porcelain)" ]; then
if [ -z "$(git log HEAD..origin/master --oneline)" ]; then
if [ -z "$1" ]; then
echo "Usage: build.sh <version>"
else
if [ -d "$1" ]; then
rm -fr "$1"
fi
mkdir "$1"
cd "$1"
Java -jar ../BuildTools.jar --rev "$1"
fi
else
echo "It looks like there are incomming updates to this repository. Pulling those changes now."
git pull
echo "This repositry has been updated. That means that this script might also have been updated. This script will now exit to ensure that the newest version is used."
echo "IMPORTANT: Please re-run this script."
fi
else
echo "It looks like you have made changes to this repository."
echo "Please remove those changes and re-run this script."
fi