text
stringlengths
0
834k
:: restricting any amount of access behind a paywall. Special permission is
:: given to allow this Software to be bundled or distributed with projects on
:: Curse.com, CurseForge.com or their related sub-domains and subsidiaries.
:: Derivative works must be open source (have its source visible and allow for
:: redistribution and modification).
:: The above copyright notice and conditions must be included in all copies or
:: substantial portions of the Software, including derivative works and
:: re-licensing thereof.
::================================================================================::
::*** DISCLAIMERS ***::
:: ""All The Mods Team"" is not affiliated with ""Mojang,"" ""Oracle,""
:: ""Curse,"" ""Twitch,"" ""Sponge,"" ""Forge"" or any other entity (or entity owning a
:: referenced product) potentially mentioned in this document or relevant source
:: code for this Software. The use of their names and/or trademarks is strictly
:: circumstantial and assumed fair-use. All credit for their respective works,
:: software, branding, copyrights and/or trademarks belongs entirely to them as
:: original owners/licensers.
:: 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 OR COPYRIGHT HOLDERS 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.
:::: *** THIS FILE NOT INTENDED TO BE EDITED, USE ""settings.cfg"" INSTEAD ***
SETLOCAL
REM Internal Scripty stuff
REM default an error code in case error block is ran without this var being defined first
SET MC_SERVER_ERROR_REASON=Unspecified
REM this is a temp variable to use for intermidiate calculations and such
SET MC_SERVER_TMP_FLAG=0
REM this is the var to keep track of sequential crashes
SET MC_SERVER_CRASH_COUNTER=1
REM set ""crash time"" to initial script start
SET MC_SERVER_CRASH_YYYYMMDD=%date:~10,4%%date:~4,2%%date:~7,2%
SET MC_SERVER_CRASH_HHMMSS=%time:~0,2%%time:~3,2%%time:~6,2%
REM delete log if already exists to start a fresh one
IF EXIST ""%~dp0serverstart.log"" DEL /F /Q ""%~dp0serverstart.log""
ECHO. 1>> ""%~dp0serverstart.log"" 2>&1
ECHO. 1>> ""%~dp0serverstart.log"" 2>&1
ECHO. 1>> ""%~dp0serverstart.log"" 2>&1
ECHO ----------------------------------------------------------------- 1>> ""%~dp0serverstart.log"" 2>&1
ECHO INFO: Starting batch at %MC_SERVER_CRASH_YYYYMMDD%:%MC_SERVER_CRASH_HHMMSS% 1>> ""%~dp0serverstart.log"" 2>&1
ECHO ----------------------------------------------------------------- 1>> ""%~dp0serverstart.log"" 2>&1
ECHO. 1>> ""%~dp0serverstart.log"" 2>&1
ECHO DEBUG: Current Dir is %CD% -- trying to change to %~dp0 1>> ""%~dp0serverstart.log"" 2>&1
CD ""%~dp0"" 1>> ""%~dp0serverstart.log"" 2>&1
:BEGIN
CLS
COLOR 3F
REM Check for config file
ECHO INFO: Checking that settings.cfg exists 1>> ""%~dp0serverstart.log"" 2>&1
IF NOT EXIST ""%~dp0settings.cfg"" (
SET MC_SERVER_ERROR_REASON=Settings.cfg_Not_Found
GOTO ERROR
)
ECHO DEBUG: settings.cfg Found. Logging full contents below: 1>> ""%~dp0serverstart.log"" 2>&1
>nul COPY ""%~dp0serverstart.log""+""%~dp0settings.cfg"" ""%~dp0serverstart.log""
ECHO. 1>> ""%~dp0serverstart.log"" 2>&1
>nul FIND /I ""MAX_RAM="" ""%~dp0settings.cfg"" || (
SET MC_SERVER_ERROR_REASON=Settings.cfg_Error:MAX_RAM
GOTO ERROR
)
>nul FIND /I ""JAVA_ARGS="" ""%~dp0settings.cfg"" || (
SET MC_SERVER_ERROR_REASON=Settings.cfg_Error:JAVA_ARGS
GOTO ERROR
)
>nul FIND /I ""CRASH_COUNT="" ""%~dp0settings.cfg"" || (
SET MC_SERVER_ERROR_REASON=Settings.cfg_Error:CRASH_COUNT
GOTO ERROR
)
>nul FIND /I ""CRASH_TIMER="" ""%~dp0settings.cfg"" || (
SET MC_SERVER_ERROR_REASON=Settings.cfg_Error:CRASH_TIMER
GOTO ERROR
)
>nul FIND /I ""RUN_FROM_BAD_FOLDER="" ""%~dp0settings.cfg"" || (
SET MC_SERVER_ERROR_REASON=Settings.cfg_Error:RUN_FROM_BAD_FOLDER
GOTO ERROR
)
>nul FIND /I ""IGNORE_OFFLINE="" ""%~dp0settings.cfg"" || (