Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 947 Bytes

File metadata and controls

40 lines (27 loc) · 947 Bytes

Module: plugin-base

The plugin-base module exposes DreamPlugin, the base class that bootstraps DreamAPI in Paper plugins.

Responsibilities

  • Initialize provider if missing
  • Scan plugin classes
  • Load services from load mode and @EnableServices
  • Run annotation processors for commands, listeners, and recipes
  • Provide helper methods for service and item/recipe access

Key class

Recommended usage

Extend DreamPlugin in your plugin main class and implement:

  • onDreamEnable()
  • onDreamDisable()

Practical Example

import fr.dreamin.dreamapi.plugin.DreamPlugin;

public final class MyPlugin extends DreamPlugin {
  @Override
  public void onDreamEnable() {
	setDebugCmd(true);
	setServiceCmd(true);
  }

  @Override
  public void onDreamDisable() {}
}