Skip to content

API Overview

Craftorithm provides a Java API for plugin developers.

Adding Dependencies

Maven

xml
<repository>
  <id>jitpack.io</id>
  <url>https://jitpack.io</url>
</repository>

<dependency>
  <groupId>com.github.YufiriaMazenta</groupId>
  <artifactId>Craftorithm</artifactId>
  <version>Tag</version>
</dependency>

Gradle

groovy
repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.YufiriaMazenta:Craftorithm:Tag'
}

API Entry Point

java
import pers.yufiria.craftorithm.api.CraftorithmAPI;

CraftorithmAPI api = CraftorithmAPI.INSTANCE;

API Modules

ModuleDescription
Item APIItem management, registration, lookup
Recipe APIRecipe management, type registration
Trigger APITrigger management, event firing
Script APIScript execution, custom function registration
Hook DevelopmentExternal item plugin integration

Thread Safety

  • Recipe operations (read/register/remove) are thread-safe
  • Trigger operations are thread-safe
  • Script execution uses isolated VM instances, supporting concurrency

基于 GPL-3.0 许可证发布