Hotswapping

From ETM
Jump to navigation Jump to search

Advanced, instant, auto detectable hot-swapping for minecraft / spigot / paper / plugins

Setup

Conceptual

  1. Run & Deploy a plugin on a remote minecraft server
  2. Connect IDE to service
  3. Change code on the fly
  4. See changes instantly after CTRL+S is pressed in the IDE for a given file


Keep in mind

  • Hotswapagent does not always work
  • Anonymous classes cause cancer
  • Running same versions essential
  • Make sure hotswap-agent-core.jar is in jbrsdk/lib/hotswap AND in mc-server libs
  • HOTSWAPAGENT='-XX:HotswapAgent=core'
  • REDEFINITION='-XX:+AllowEnhancedClassRedefinition -XX:+AllowRedefinitionToAddDeleteMethods'
  • EXPERIMENTAL='--enable-preview -XX:+UnlockExperimentalVMOptions'