From 3e6a7f5771c14685e4c886ff307e44e506e81434 Mon Sep 17 00:00:00 2001 From: mathias Date: Fri, 25 May 2018 19:49:13 +0300 Subject: [PATCH] First version --- LICENSE | 24 ++++++++++++++++++++++++ app.json | 9 +++++++++ bin/compile | 27 +++++++++++++++++++++++++++ bin/detect | 3 +++ bin/excludes | 30 ++++++++++++++++++++++++++++++ bin/release | 6 ++++++ bin/start | 31 +++++++++++++++++++++++++++++++ 7 files changed, 130 insertions(+) create mode 100644 LICENSE create mode 100644 app.json create mode 100755 bin/compile create mode 100755 bin/detect create mode 100644 bin/excludes create mode 100755 bin/release create mode 100755 bin/start diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6bb8a29 --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..b47e18d --- /dev/null +++ b/app.json @@ -0,0 +1,9 @@ +{ + "name": "Kaboom.pw", + "stack": "heroku-18", + "buildpacks": [ + { + "url": "https://github.com/heroku/heroku-buildpack-jvm-common" + } + ] +} diff --git a/bin/compile b/bin/compile new file mode 100755 index 0000000..96cc743 --- /dev/null +++ b/bin/compile @@ -0,0 +1,27 @@ +#!/bin/bash +BIN_DIR="$(cd "$(dirname "$0")" && pwd)" +BUILD_DIR=$1 + +mkdir -p $BUILD_DIR/bin/ +cp $BIN_DIR/start $BUILD_DIR/bin/ +cp $BIN_DIR/excludes $BUILD_DIR/bin/ + +curl -o inotify-tools.deb -s -L "http://security.ubuntu.com/ubuntu/pool/universe/i/inotify-tools/inotify-tools_3.14-2_amd64.deb" +dpkg -x *.deb . +mv usr/bin/inotifywait $BUILD_DIR/bin/ + +curl -o $BUILD_DIR/minecraft-server.jar -s -L "https://yivesmirror.com/files/paperspigot/PaperSpigot-latest.jar" +curl -o $BUILD_DIR/plugins/DoBlockImage.jar -s -L "https://api.spiget.org/v2/resources/5454/download" +curl -o Essentials.zip -s -L "https://ci.ender.zone/job/EssentialsX/lastSuccessfulBuild/artifact/Essentials/target/*zip*/target.zip" +unzip Essentials.zip > /dev/null 2>&1 +mv target/Essentials* $BUILD_DIR/plugins/ +curl -o $BUILD_DIR/plugins/FastAsyncWorldEdit.jar -s -L "http://empcraft.com/fawe/latest.php?bukkit" +curl -o ImageOnMap.zip -s -L "https://jenkins.carrade.eu/job/ImageOnMap/lastSuccessfulBuild/artifact/target/*zip*/target.zip" +unzip ImageOnMap.zip > /dev/null 2>&1 +mv target/ImageOnMap* $BUILD_DIR/plugins/ +curl -o $BUILD_DIR/plugins/LibsDisguises.jar -s -L "https://ci.md-5.net/job/LibsDisguises/lastSuccessfulBuild/artifact/target/LibsDisguises.jar" +curl -o $BUILD_DIR/plugins/MySkin.jar -s -L "https://api.spiget.org/v2/resources/52303/download" +curl -o $BUILD_DIR/plugins/ProtocolLib.jar -s -L "http://ci.dmulloy2.net/job/ProtocolLib/lastStableBuild/artifact/modules/ProtocolLib/target/ProtocolLib.jar" +URL=$(curl -s https://api.github.com/repos/iSach/UltraCosmetics/releases/latest | grep browser_download_url | cut -d '"' -f 4) +curl -o $BUILD_DIR/plugins/UltraCosmetics.jar -s -L "$URL" +curl -o $BUILD_DIR/plugins/WorldEdit.jar -s -L "http://builds.enginehub.org/job/worldedit/10120/download/worldedit-bukkit-6.1.9-SNAPSHOT-dist.jar" \ No newline at end of file diff --git a/bin/detect b/bin/detect new file mode 100755 index 0000000..08cd6e1 --- /dev/null +++ b/bin/detect @@ -0,0 +1,3 @@ +#!/bin/bash +echo "Kaboom" +exit 0 \ No newline at end of file diff --git a/bin/excludes b/bin/excludes new file mode 100644 index 0000000..ef0ea5b --- /dev/null +++ b/bin/excludes @@ -0,0 +1,30 @@ +plugins/bStats/ +plugins/Essentials/config.yml +plugins/Essentials/items.csv +plugins/Essentials/motd.txt +plugins/Essentials/rules.txt +plugins/Essentials/upgrades-done.yml +plugins/Essentials/worth.yml +plugins/FastAsyncWorldEdit/de/ +plugins/FastAsyncWorldEdit/es/ +plugins/FastAsyncWorldEdit/ru/ +plugins/FastAsyncWorldEdit/textures/ +plugins/FastAsyncWorldEdit/tr/ +plugins/FastAsyncWorldEdit/commands.yml +plugins/FastAsyncWorldEdit/config.yml +plugins/FastAsyncWorldEdit/extrablocks.json +plugins/FastAsyncWorldEdit/message.yml +plugins/ImageOnMap/i18n/ +plugins/ImageOnMap/config.yml +plugins/LibsDisguises/Translations/ +plugins/LibsDisguises/config.yml +plugins/LibsDisguises/disguises.yml +plugins/MySkin/config.yml +plugins/MySkin/localize.yml +plugins/PluginMetrics/ +plugins/ProtocolLib/ +plugins/UltraCosmetics/config.yml +plugins/UltraCosmetics/messages.yml +plugins/Updater/ +plugins/WorldEdit/config.yml +*.jar \ No newline at end of file diff --git a/bin/release b/bin/release new file mode 100755 index 0000000..9bf01f5 --- /dev/null +++ b/bin/release @@ -0,0 +1,6 @@ +#!/bin/bash +cat < /dev/null 2>&1 + sleep 1 +done & + +while true; do + ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -o ServerAliveCountMax=9999 -S none -T -R 25565:localhost:25565 connect@kaboom.pw > /dev/null 2>&1 + sleep 1 +done & + +while true; do + java -Xms300m -XX:MinHeapFreeRatio=1 -XX:MaxHeapFreeRatio=10 -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:G1MixedGCLiveThresholdPercent=50 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:MaxGCPauseMillis=100 -XX:+AggressiveOpts -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:InitiatingHeapOccupancyPercent=10 -XX:TargetSurvivorRatio=90 -XX:+UseLargePagesInMetaspace -Dcom.mojang.eula.agree=true -Dlog4j.configurationFile=log4j2.xml -jar minecraft-server.jar --world-dir=worlds > /dev/null 2>&1 + sleep 1 +done & + +sleep infinity \ No newline at end of file