bukkit-hc-revive/README.md
2020-06-26 14:12:15 +00:00

1.7 KiB

bukkit-template

This is a template for bukkit plugins. It contains some example code with a /ping command, a gradle build configuration and a docker-compose file for easy testing.

Befor you start

Make sure the minecraft version is set in build.gradle

api {
    version '1.16.1'
}

and in dev/docker-compose.yml

- SPIGOT_VER=1.16.1

Also make sure to change description, author, name, etc in build.gradle and the project name in settings.gradle.

Build

The build is handled by gradle. So run ./gradlew clean build. The doc for the plugin used can be found here and here.

Running gradle from Intellij works fine but from the terminal i had to use JAVA_HOME=/usr/lib/jvm/java-11-openjdk ./gradlew clean build.

Dev tools

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 that you have to change to container directory to 777 (sudo chmod 777 container). The container dir is getting created by docker so it is owned by root and we can't write in there. Documentation for the container can be found here. The most important commands are:

  • sudo docker exec spigot-dev mc_send op myMcUsername
  • sudo docker exec spigot-dev mc_restart
  • sudo docker exec spigot-dev mc_log

Scripts

  • insertPlugin.sh moves all files in the build to the dev server
  • restartServer.sh restarts the spigot server
  • log.sh shows and follows the server log