script: added script to start server locally

This commit is contained in:
Yannik Bretschneider 2021-07-16 17:23:12 +02:00
parent 601bf9f174
commit eca1064294

23
startServerLocally.ps1 Normal file
View File

@ -0,0 +1,23 @@
Write-Host "Trying to start server locally"
if ($Args[0] -eq "-r") {
Write-Host "Rebuilding application"
$build = $true
} else {
Write-Host "No rebuild flag (-r) given. Starting directly..."
$build = $false
}
if ($build) {
try {
.\gradlew Server:jar
} catch {
Write-Host "Gradle doesn't seem to be installed."
}
}
try {
java -jar Server/build/libs/Server.jar -c .\configs\marvelheros.character.json -m.\configs\matchconfig_1.game.json -s .\configs\asgard.scenario.json -v
} catch {
Write-Host "Couldn't execute. Is Java installed?"
}