improved dev stuff. Local server and build
This commit is contained in:
parent
46e97dcb43
commit
f8a466a955
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,6 +2,8 @@
|
||||
**/build/
|
||||
!src/**/build/
|
||||
dev/container
|
||||
dev/server
|
||||
dev/build
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
15
.idea/runConfigurations/Attach.xml
Normal file
15
.idea/runConfigurations/Attach.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Attach" type="Remote">
|
||||
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||
<option name="SERVER_MODE" value="false" />
|
||||
<option name="SHMEM_ADDRESS" />
|
||||
<option name="HOST" value="127.0.0.1" />
|
||||
<option name="PORT" value="5005" />
|
||||
<option name="AUTO_RESTART" value="false" />
|
||||
<RunnerSettings RunnerId="Debug">
|
||||
<option name="DEBUG_PORT" value="5005" />
|
||||
<option name="LOCAL" value="false" />
|
||||
</RunnerSettings>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
@ -15,6 +15,13 @@ Running gradle from Intellij works fine but from the terminal i had to use
|
||||
|
||||
# Dev tools
|
||||
|
||||
## Local Server
|
||||
You can compile the spigot server on your own by running `./buildSpigot.sh 1.16.1` inside the dev directory. The first
|
||||
parameter is the version. If no version is given the `latest` tag is used which is not always the newest minecraft
|
||||
version.
|
||||
|
||||
After that you can start the server and it will run inside the `server` directory.
|
||||
|
||||
## Server
|
||||
You can run a spigot server for development. Run `sudo docker-compose up` inside of `dev`.
|
||||
To make inserting the plugin easier change the `SPIGOT_UID` to your UID (run the `id` command). The only problem is
|
||||
|
15
dev/buildSpigot.sh
Executable file
15
dev/buildSpigot.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env sh
|
||||
SCRIPT=$(readlink -f "$0")
|
||||
SCRIPTPATH=$(dirname "$SCRIPT")
|
||||
|
||||
mkdir $SCRIPTPATH/build
|
||||
mkdir $SCRIPTPATH/server
|
||||
|
||||
cd $SCRIPTPATH/build
|
||||
curl -o BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
|
||||
|
||||
java -jar BuildTools.jar --rev ${1:-latest}
|
||||
|
||||
cd $SCRIPTPATH/server
|
||||
echo "eula=true" > eula.txt
|
||||
|
@ -3,7 +3,7 @@ version: "3"
|
||||
services:
|
||||
spigot-dev:
|
||||
image: "nimmis/spigot"
|
||||
container_name: "spigot-dev-hc-revive"
|
||||
container_name: "spigot-dev"
|
||||
environment:
|
||||
- EULA=true
|
||||
- MC_MAXMEM=4g
|
||||
@ -13,4 +13,4 @@ services:
|
||||
- "./container:/minecraft"
|
||||
restart: "no"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
- "25565:25565"
|
5
dev/docker/insertPlugin.sh
Executable file
5
dev/docker/insertPlugin.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
SCRIPT=$(readlink -f "$0")
|
||||
SCRIPTPATH=$(dirname "$SCRIPT")
|
||||
|
||||
cp $SCRIPTPATH/../../build/libs/* $SCRIPTPATH/container/plugins
|
2
dev/docker/log.sh
Executable file
2
dev/docker/log.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env sh
|
||||
sudo docker exec spigot-dev mc_log
|
2
dev/docker/restartServer.sh
Executable file
2
dev/docker/restartServer.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env sh
|
||||
sudo docker exec spigot-dev mc_restart
|
@ -2,4 +2,4 @@
|
||||
SCRIPT=$(readlink -f "$0")
|
||||
SCRIPTPATH=$(dirname "$SCRIPT")
|
||||
|
||||
cp $SCRIPTPATH/../build/libs/* $SCRIPTPATH/container/plugins
|
||||
cp $SCRIPTPATH/../build/libs/* $SCRIPTPATH/server/plugins
|
||||
|
@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
sudo docker exec spigot-dev-hc-revive mc_log
|
@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
sudo docker exec spigot-dev-hc-revive mc_restart
|
7
dev/startServer.sh
Executable file
7
dev/startServer.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
SCRIPT=$(readlink -f "$0")
|
||||
SCRIPTPATH=$(dirname "$SCRIPT")
|
||||
|
||||
cd $SCRIPTPATH/server
|
||||
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:5005 -jar $SCRIPTPATH/build/spigot-*.jar nogui
|
||||
|
Loading…
Reference in New Issue
Block a user