Added proper testing server scripts.

Integrated scripts into VSCode metadata.
This commit is contained in:
Harrison Deng 2020-04-22 03:26:46 -05:00
parent c902e520c5
commit 73b9225a69
12 changed files with 48 additions and 234 deletions

7
.vscode/launch.json vendored
View File

@ -12,10 +12,13 @@
}, },
{ {
"type": "java", "type": "java",
"name": "Debug (Attach)", "name": "Debug With MC Server",
"request": "attach", "request": "attach",
"hostName": "localhost", "hostName": "localhost",
"port": 25566 "port": 25566,
"sourcePaths": ["src/main/java"],
"preLaunchTask": "start test server",
"postDebugTask": "stop test server"
} }
] ]
} }

33
.vscode/tasks.json vendored
View File

@ -20,6 +20,39 @@
"type": "shell", "type": "shell",
"command": "mvn package", "command": "mvn package",
"group": "build" "group": "build"
},
{
"dependsOn": ["package"],
"label": "update test server",
"type": "shell",
"options": {"cwd": "${workspaceFolder}/test-server/"},
"command": "powershell -ExecutionPolicy Bypass -File ./load-latest-build.ps1",
"problemMatcher": []
},
{
"dependsOn": ["update test server"],
"label": "start test server",
"type": "shell",
"options": {"cwd": "${workspaceFolder}/test-server/"},
"command": "powershell -ExecutionPolicy Bypass -File ./start-debug-server-process.ps1",
"problemMatcher": [],
"group": "test",
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
},
{
"label": "stop test server",
"type": "shell",
"options": {"cwd": "${workspaceFolder}/test-server/"},
"command": "powershell -ExecutionPolicy Bypass -File ./end-debug-server-process.ps1",
"problemMatcher": [],
"group": "test",
} }
] ]
} }

View File

@ -0,0 +1,3 @@
$sID = Get-Item -Path ./pid.temp | Get-Content -Tail 1
Stop-Process -Id $sID
Remove-Item "./pid.temp"

View File

@ -0,0 +1,4 @@
write-Output "Attempting to delete previous world..."
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"

View File

@ -1,4 +0,0 @@
# http://mcstats.org
opt-out: false
guid: d6057a25-caa0-4b6d-8c16-4f21097f1749
debug: false

View File

@ -1,152 +0,0 @@
#
# WorldEdit's Configuration File
#
# About editing this file:
# - DO NOT USE TABS. You MUST use spaces or Bukkit will complain and post
# errors. If you use an editor, like Notepad++ (recommended for Windows
# users), you must configure it to "replace tabs with spaces."
# This can be changed in Settings > Preferences > Language Menu.
# - Don't get rid of indentations. They are indented so some entries that are
# in categories, like "max-blocks-changed", are placed in the "limits"
# category.
# - If you want to check the format of this file before putting it
# into WorldEdit, paste it into http://yaml-online-parser.appspot.com/
# and see if it gives you "ERROR:".
# - Lines starting with # are comments, so they are ignored.
# - If you want to allow blocks, make sure to change "disallowed-blocks" to []
#
limits:
max-blocks-changed:
default: -1
maximum: -1
max-polygonal-points:
default: -1
maximum: 20
max-radius: -1
max-super-pickaxe-size: 5
max-brush-radius: 5
butcher-radius:
default: -1
maximum: -1
disallowed-blocks:
- "minecraft:oak_sapling"
- "minecraft:jungle_sapling"
- "minecraft:dark_oak_sapling:"
- "minecraft:spruce_sapling"
- "minecraft:birch_sapling"
- "minecraft:acacia_sapling"
- "minecraft:black_bed"
- "minecraft:blue_bed"
- "minecraft:brown_bed"
- "minecraft:cyan_bed"
- "minecraft:gray_bed"
- "minecraft:green_bed"
- "minecraft:light_blue_bed"
- "minecraft:light_gray_bed"
- "minecraft:lime_bed"
- "minecraft:magenta_bed"
- "minecraft:orange_bed"
- "minecraft:pink_bed"
- "minecraft:purple_bed"
- "minecraft:red_bed"
- "minecraft:white_bed"
- "minecraft:yellow_bed"
- "minecraft:powered_rail"
- "minecraft:detector_rail"
- "minecraft:grass"
- "minecraft:dead_bush"
- "minecraft:moving_piston"
- "minecraft:piston_head"
- "minecraft:sunflower"
- "minecraft:rose_bush"
- "minecraft:dandelion"
- "minecraft:poppy"
- "minecraft:brown_mushroom"
- "minecraft:red_mushroom"
- "minecraft:tnt"
- "minecraft:torch"
- "minecraft:fire"
- "minecraft:redstone_wire"
- "minecraft:wheat"
- "minecraft:potatoes"
- "minecraft:carrots"
- "minecraft:melon_stem"
- "minecraft:pumpkin_stem"
- "minecraft:beetroots"
- "minecraft:rail"
- "minecraft:lever"
- "minecraft:redstone_torch"
- "minecraft:redstone_wall_torch"
- "minecraft:repeater"
- "minecraft:comparator"
- "minecraft:stone_button"
- "minecraft:birch_button"
- "minecraft:acacia_button"
- "minecraft:dark_oak_button"
- "minecraft:jungle_button"
- "minecraft:oak_button"
- "minecraft:spruce_button"
- "minecraft:cactus"
- "minecraft:sugar_cane"
- "minecraft:bedrock"
use-inventory:
enable: false
allow-override: true
creative-mode-overrides: false
logging:
log-commands: false
file: worldedit.log
# The format of custom log message. This is java general format string (java.util.Formatter). Arguments are:
# 1$ : date - a Date object representing event time of the log record.
# 2$ : source - a string representing the caller, if available; otherwise, the logger's name.
# 3$ : logger - the logger's name.
# 4$ : level - the log level.
# 5$ : message - the formatted log message returned from the Formatter.formatMessage(LogRecord) method. It uses java.text formatting and does not use the java.util.Formatter format argument.
# 6$ : thrown - a string representing the throwable associated with the log record and its backtrace beginning with a newline character, if any; otherwise, an empty string.
# For details see:
# https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html
# https://docs.oracle.com/javase/8/docs/api/java/util/logging/SimpleFormatter.html#format-java.util.logging.LogRecord-
format: "[%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS %4$s]: %5$s%6$s%n"
super-pickaxe:
drop-items: true
many-drop-items: false
snapshots:
directory:
navigation-wand:
item: minecraft:compass
max-distance: 100
scripting:
timeout: 3000
dir: craftscripts
saving:
dir: schematics
files:
allow-symbolic-links: false
history:
size: 15
expiration: 10
calculation:
timeout: 100
debugging:
trace-unflushed-sessions: false
wand-item: minecraft:wooden_axe
shell-save-type:
no-double-slash: false
no-op-permissions: false
debug: false
show-help-on-first-use: true
server-side-cui: true
command-block-support: false

View File

@ -1 +0,0 @@
{"useServerCUI":false,"wandItem":"minecraft:wooden_axe","navWandItem":"minecraft:compass"}

View File

@ -1,9 +0,0 @@
# bStats collects some data for plugin authors like how many servers are using their plugins.
# To honor their work, you should not disable it.
# This has nearly no effect on the server performance!
# Check out https://bStats.org/ to learn more :)
enabled: true
serverUuid: a3342071-2666-43b0-b4ae-739c1113ebd8
logFailedRequests: false
logSentData: false
logResponseStatusText: false

View File

@ -1,47 +0,0 @@
#Minecraft server properties
#Tue Apr 21 20:37:39 CDT 2020
spawn-protection=16
max-tick-time=60000
query.port=25565
generator-settings=
force-gamemode=false
allow-nether=true
enforce-whitelist=false
gamemode=survival
broadcast-console-to-ops=true
enable-query=false
player-idle-timeout=0
difficulty=easy
spawn-monsters=true
broadcast-rcon-to-ops=true
op-permission-level=4
pvp=true
snooper-enabled=true
level-type=default
hardcore=false
enable-command-block=false
max-players=20
network-compression-threshold=256
resource-pack-sha1=
max-world-size=29999984
function-permission-level=2
rcon.port=25575
server-port=25565
debug=false
server-ip=
spawn-npcs=true
allow-flight=false
level-name=world
view-distance=10
resource-pack=
spawn-animals=true
white-list=false
rcon.password=
generate-structures=true
max-build-height=256
online-mode=true
level-seed=
use-native-transport=true
prevent-proxy-connections=false
enable-rcon=false
motd=A Minecraft Server

View File

@ -0,0 +1,3 @@
$SID = Start-Process java -ArgumentList "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=25566", "-Xms512M", "-Xmx1G", "-jar", "paper-195.jar" -NoNewWindow -PassThru
$SID = $SID.Id
$SID | Out-File -FilePath "pid.temp"

View File

@ -1,8 +0,0 @@
@ECHO OFF
ECHO "Attempting to delete previous world..."
del /s /f /q world >nul 2>&1
ECHO "Attempting to copy plugin jar to plugins folder"
COPY "..\target\IslandSurvivalCraft-1.0.0.jar" "plugins\IslandSurvivalCraft-1.0.0.jar" >nul
ECHO "Starting server..."
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=25566 -Xms512M -Xmx1G -jar paper-195.jar nogui
pause

View File

@ -1,11 +0,0 @@
Stack trace:
Frame Function Args
00000010000 0018006137E (0018025BEB0, 0018024E199, 00000010000, 000FFFFBA60)
00000010000 00180049229 (00100002000, 00000000000, 00000000000, 00180338C70)
00000010000 00180049262 (00000000000, 00180338F80, 00000010000, 00000000000)
00000010000 0018005A9EC (001800C9612, 00000000000, 00000000000, 00000000000)
000FFFFCCD0 0018005AA67 (00000000020, 00000000000, 00180049C3F, 00000000000)
000FFFFCCD0 001800499EC (00000000000, 00000000000, 00000000000, 00000000000)
00000000000 00180048343 (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFFFF0 001800483F4 (00000000000, 00000000000, 00000000000, 00000000000)
End of stack trace