diff --git a/.gitignore b/.gitignore index 4e9acc5..07293b5 100644 --- a/.gitignore +++ b/.gitignore @@ -125,3 +125,9 @@ buildNumber.properties #Additional **/*.code-workspace local_tools + +#Test server stuff +test-server/* +!test-server/*.ps1 +!test-server/bukkit.yml +!test-server/paper-195.jar \ No newline at end of file diff --git a/test-server/bukkit.yml b/test-server/bukkit.yml new file mode 100644 index 0000000..6ee200a --- /dev/null +++ b/test-server/bukkit.yml @@ -0,0 +1,42 @@ +# This is the main configuration file for Bukkit. +# As you can see, there's actually not that much to configure without any plugins. +# For a reference for any variable inside this file, check out the Bukkit Wiki at +# https://www.spigotmc.org/go/bukkit-yml +# +# If you need help on this file, feel free to join us on irc or leave a message +# on the forums asking for advice. +# +# IRC: #spigot @ irc.spi.gt +# (If this means nothing to you, just go to https://www.spigotmc.org/go/irc ) +# Forums: https://www.spigotmc.org/ +# Bug tracker: https://www.spigotmc.org/go/bugs + + +settings: + allow-end: true + warn-on-overload: true + permissions-file: permissions.yml + update-folder: update + plugin-profiling: false + connection-throttle: 4000 + query-plugins: true + deprecated-verbose: default + shutdown-message: Server closed + minimum-api: none +spawn-limits: + monsters: 70 + animals: 10 + water-animals: 15 + ambient: 15 +chunk-gc: + period-in-ticks: 600 +ticks-per: + animal-spawns: 400 + monster-spawns: 1 + water-spawns: 1 + ambient-spawns: 1 + autosave: 6000 +aliases: now-in-commands.yml +worlds: + world: + generator: IslandSurvivalCraft diff --git a/test-server/end_process.ps1 b/test-server/end_process.ps1 new file mode 100644 index 0000000..69739ad --- /dev/null +++ b/test-server/end_process.ps1 @@ -0,0 +1,8 @@ +if (Test-Path ./pid.temp) { + $sID = Get-Item -Path ./pid.temp | Get-Content -Tail 1 + if (Get-Process -Id $sID -ErrorAction SilentlyContinue) { + Stop-Process -Id $sID + } + Remove-Item "./pid.temp" +} + diff --git a/test-server/load_latest_build.ps1 b/test-server/load_latest_build.ps1 new file mode 100644 index 0000000..685dfde --- /dev/null +++ b/test-server/load_latest_build.ps1 @@ -0,0 +1,4 @@ +write-Output "Deleting previous world if there was one..." +remove-Item -Recurse world -Force -ErrorAction Ignore +write-Output "Attempting to copy plugin jar to plugins folder..." +copy-Item -Path "..\target\IslandSurvivalCraft-1.0.0.jar" -Destination "plugins\IslandSurvivalCraft-1.0.0.jar" diff --git a/test-server/paper-195.jar b/test-server/paper-195.jar new file mode 100644 index 0000000..ab13375 Binary files /dev/null and b/test-server/paper-195.jar differ diff --git a/test-server/start_normal.ps1 b/test-server/start_normal.ps1 new file mode 100644 index 0000000..c29b11f --- /dev/null +++ b/test-server/start_normal.ps1 @@ -0,0 +1 @@ +Start-Process java -ArgumentList "-Xms512M", "-Xmx1G", "-jar", "paper-195.jar", "nogui" \ No newline at end of file diff --git a/test-server/start_process.ps1 b/test-server/start_process.ps1 new file mode 100644 index 0000000..85f32d0 --- /dev/null +++ b/test-server/start_process.ps1 @@ -0,0 +1,6 @@ +write-Output "Attempting to start Paper test server." +$SID = Start-Process java -ArgumentList "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=25566", "-Xms512M", "-Xmx1G", "-jar", "paper-195.jar", "nogui" -PassThru +$SID = $SID.Id +write-Output "Process started. PID is: $SID" + +$SID | Out-File -FilePath "pid.temp" \ No newline at end of file