Skip to content

Testing Debugging

DarkBladeDev edited this page Dec 27, 2025 · 1 revision

Testing and debugging

Setting up a test environment

Practical recommendation:

  1. Local Paper server.
  2. Install MultiBlockEngine.jar into /plugins/.
  3. Create /plugins/MultiBlockEngine/addons/ and put your addon JAR there.
  4. Restart the server.

Recommended test cases

1) Addon loading

  • addon.properties present.
  • valid and unique id.
  • api matches the engine.

2) Namespacing

  • registerAction("addonId:...").
  • registerCondition("addonId:...").
  • createMultiblock("name") creates addonId:name.
  • registerMatcher("addonId", ...).

3) Dependencies

  • depends enables in order.
  • missing dependency → addon fails with a clear log.

4) Capabilities

  • capability factory returns non-null.
  • duplicate capability class → controlled error.
  • exception in factory → addon is marked FAILED (isolated).

Debugging tools

  • Server logs:
    • expected prefix: [MultiBlockEngine][Addon:<id>][LOAD|ENABLE|DISABLE|RUNTIME] ...
  • Engine visual debug (if you use it for structures).
  • Recommended strategy:
    • In onLoad: register and validate everything that is registrable.
    • In onEnable: create code-defined multiblocks and register listeners.

Clone this wiki locally